File: ObjcProperty.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 (33 lines) | stat: -rw-r--r-- 1,583 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
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t1)
// RUN: cp -r %S/Inputs/ObjcProperty/ObjcProperty.framework %t
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t/ObjcProperty.framework/Modules/ObjcProperty.swiftmodule/%target-swiftmodule-name -import-underlying-module -F %t -module-name ObjcProperty -disable-objc-attr-requires-foundation-module %s -emit-symbol-graph -emit-symbol-graph-dir %t
// RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name ObjcProperty -F %t -output-dir %t1 -pretty-print -v
// RUN: %validate-json %t/ObjcProperty.symbols.json %t/ObjcProperty.formatted.symbols.json
// RUN: %FileCheck %s --input-file %t/ObjcProperty.formatted.symbols.json
// RUN: %FileCheck %s --input-file %t/ObjcProperty.formatted.symbols.json --check-prefix XLANG
// RUN: %FileCheck %s --input-file %t1/ObjcProperty.symbols.json
// RUN: %FileCheck %s --input-file %t1/ObjcProperty.symbols.json --check-prefix XLANG

// REQUIRES: objc_interop

public enum SwiftEnum {}

public class SwiftClass : Foo {}

// ensure we don't accidentaly pull in exported objc modules

// CHECK-NOT: "precise": "c:objc(cs)NSString"

// ensure that synthesized inherited objc symbols do not appear in the symbol graph

// CHECK-NOT:       "c:objc(cs)NSObject(im)init"

// ensure that children of clang nodes appear in the symbol graph

// CHECK: "precise": "c:objc(cs)Foo(py)today"

// ensure that a swift class that inherits from an objc class still doesn't generate inherited
// symbols

// XLANG-COUNT-2: selectDate: