File: print_clang_foundation.swift

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (61 lines) | stat: -rw-r--r-- 3,469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// RUN: %empty-directory(%t)

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSArray -function-definitions=false > %t/Foundation.NSArray.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSArray.printed.txt -check-prefix=CHECK_NSARRAY %s

// REQUIRES: objc_interop

// CHECK_NSARRAY: class NSArray
// CHECK_NSARRAY: init()

// CHECK_NSARRAY: {{^}}  var sortedArrayHint: Data { get }

// CHECK_NSARRAY: convenience init?(contentsOfFile path: String)
// CHECK_NSARRAY: convenience init?(contentsOf url: URL)


// CHECK_NSARRAY: class NSMutableArray : NSArray
// CHECK_NSARRAY:   func setArray(_ otherArray: [Any])

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSKeyValueCoding -function-definitions=false > %t/Foundation.NSKeyValueCoding.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSKeyValueCoding.printed.txt -check-prefix=CHECK2 %s

// CHECK2: extension NSObject

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSString -function-definitions=false > %t/Foundation.NSString.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSString.printed.txt -check-prefix=CHECK_NSSTRING %s
// RUN: %FileCheck -input-file %t/Foundation.NSString.printed.txt -check-prefix=CHECK_DICTIONARY %s

// Make sure that we don't qualify 'NSErrorPointer'.
// CHECK_NSSTRING: init(contentsOfFile path: String, encoding enc: UInt) throws

// CHECK_DICTIONARY: func propertyListFromStringsFileFormat() -> [AnyHashable : Any]

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation -function-definitions=false > %t/Foundation.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.printed.txt -check-prefix=CHECK_DUP %s

// CHECK_DUP: import CoreFoundation{{$}}
// CHECK_DUP-NOT: import CoreFoundation{{$}}

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSTimeZone -function-definitions=false > %t/Foundation.NSTimeZone.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSTimeZone.printed.txt -check-prefix=CHECK_NSTIMEZONE %s

// CHECK_NSTIMEZONE: func secondsFromGMT(for aDate: Date) -> Int
// CHECK_NSTIMEZONE: func abbreviation(for aDate: Date) -> String?
// CHECK_NSTIMEZONE: var nextDaylightSavingTimeTransition: Date? { get }

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSCalendar -function-definitions=false > %t/Foundation.NSCalendar.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSCalendar.printed.txt -check-prefix=CHECK_NSCALENDAR %s

// CHECK_NSCALENDAR: func date(from comps: DateComponents) -> Date?

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSDateInterval -function-definitions=false > %t/Foundation.NSDateInterval.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSDateInterval.printed.txt -check-prefix=CHECK_NSDATEINTERVAL %s

// CHECK_NSDATEINTERVAL: func intersection(with dateInterval: DateInterval) -> DateInterval?

// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation.NSCoder -function-definitions=false > %t/Foundation.NSCoder.printed.txt
// RUN: %FileCheck -input-file %t/Foundation.NSCoder.printed.txt -check-prefix=CHECK_NSCODER %s

// CHECK_NSCODER: func failWithError(_ error: any Error)
// CHECK_NSCODER: {{^}}  var error: (any Error)? { get }