File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ // FIXME: Swift parser is not enabled on non-MacOS yet
2
+ // REQUIRES: OS=macosx
3
+
4
+ // REQUIRES: executable_test
5
+
6
+ // RUN: %empty-directory(%t)
7
+
8
+ // Build the plugin
9
+ // RUN: %target-build-swift %S/../../Macros/Inputs/syntax_macro_definitions.swift -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition -swift-version 5 -I %swift-host-lib-dir -L %swift-host-lib-dir -g -no-toolchain-stdlib-rpath
10
+
11
+ // RUN: %target-build-swift %s -module-name Macro -emit-module -emit-module-path %t -swift-version 5 -enable-experimental-feature Macros -load-plugin-library %t/%target-library-name(MacroDefinition) -I %swift-host-lib-dir
12
+ // RUN: %target-swift-symbolgraph-extract -module-name Macro -I %t -pretty-print -output-dir %t
13
+ // RUN: %FileCheck %s --input-file %t/Macro.symbols.json
14
+ // RUN: %FileCheck %s --input-file %t/Macro.symbols.json --check-prefix MISSING
15
+
16
+ @freestanding ( expression)
17
+ public macro customFileID( ) -> String = #externalMacro( module: " MacroDefinition " , type: " FileIDMacro " )
18
+
19
+ @attached ( peer)
20
+ public macro addCompletionHandler( ) = #externalMacro( module: " MacroDefinition " , type: " AddCompletionHandler " )
21
+
22
+ @freestanding ( expression)
23
+ macro moduleCustomFileID( ) -> String = #externalMacro( module: " MacroDefinition " , type: " FileIDMacro " )
24
+
25
+ // CHECK-DAG: "precise": "s:5Macro20addCompletionHandleryycfm"
26
+ // CHECK-DAG: "precise": "s:5Macro12customFileIDSSycfm"
27
+
28
+ // MISSING-NOT: moduleCustomFileID
You can’t perform that action at this time.
0 commit comments