File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ let package = Package(
182182 . macro(
183183 name: " TestingMacros " ,
184184 dependencies: [
185+ " _TestDiscovery " ,
185186 . product( name: " SwiftDiagnostics " , package : " swift-syntax " ) ,
186187 . product( name: " SwiftSyntax " , package : " swift-syntax " ) ,
187188 . product( name: " SwiftSyntaxBuilder " , package : " swift-syntax " ) ,
Original file line number Diff line number Diff line change @@ -114,13 +114,19 @@ target_sources(TestingMacros PRIVATE
114114 TestDeclarationMacro.swift
115115 TestingMacrosMain.swift)
116116
117+ add_subdirectory (../_TestDiscovery)
118+ add_subdirectory (../_TestingInternals)
119+
117120target_compile_options (TestingMacros PRIVATE
118121 "SHELL:-Xfrontend -disable-implicit-string-processing-module-import" )
119122
120123target_link_libraries (TestingMacros PRIVATE
121124 SwiftSyntax::SwiftSyntax
122125 SwiftSyntax::SwiftSyntaxMacroExpansion
123- SwiftSyntax::SwiftSyntaxMacros)
126+ SwiftSyntax::SwiftSyntaxMacros
127+ _TestDiscovery
128+ _TestingInternals)
129+
124130if (SwiftTesting_BuildMacrosAsExecutables)
125131 # Link the 'SwiftCompilerPlugin' target, but only when built as an executable.
126132 target_link_libraries (TestingMacros PRIVATE
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ import SwiftSyntax
1313import SwiftSyntaxBuilder
1414import SwiftSyntaxMacros
1515
16+ @_spi ( Experimental) @_spi ( ForToolsIntegrationOnly) import _TestDiscovery
17+
1618/// An enumeration representing the different kinds of test content known to the
1719/// testing library.
1820///
@@ -21,12 +23,12 @@ import SwiftSyntaxMacros
2123///
2224/// - Bug: This type should be imported directly from `_TestDiscovery` instead
2325/// of being redefined (differently) here.
24- enum TestContentKind : UInt32 {
26+ extension TestContentKind {
2527 /// A test or suite declaration.
26- case testDeclaration = 0x74657374
28+ static var testDeclaration : Self { " test " }
2729
2830 /// An exit test.
29- case exitTest = 0x65786974
31+ static var exitTest : Self { " exit " }
3032
3133 /// This kind value as a comment (`/* 'abcd' */`) if it looks like it might be
3234 /// a [FourCC](https://en.wikipedia.org/wiki/FourCC) value, or `nil` if not.
You can’t perform that action at this time.
0 commit comments