@@ -21,7 +21,11 @@ import _SwiftSyntaxTestSupport
2121
2222public class EvaluateTests : XCTestCase {
2323 func testLiterals( ) throws {
24- let buildConfig = StaticBuildConfiguration ( customConditions: [ " DEBUG " , " ASSERTS " ] )
24+ let buildConfig = StaticBuildConfiguration (
25+ customConditions: [ " DEBUG " , " ASSERTS " ] ,
26+ languageVersion: VersionTuple ( 6 ) ,
27+ compilerVersion: VersionTuple ( 6 , 2 )
28+ )
2529
2630 assertIfConfig ( " true " , . active, configuration: buildConfig)
2731 assertIfConfig ( " false " , . inactive, configuration: buildConfig)
@@ -71,7 +75,11 @@ public class EvaluateTests: XCTestCase {
7175 }
7276
7377 func testCustomConfigs( ) throws {
74- let buildConfig = StaticBuildConfiguration ( customConditions: [ " DEBUG " , " ASSERTS " , " try " ] )
78+ let buildConfig = StaticBuildConfiguration (
79+ customConditions: [ " DEBUG " , " ASSERTS " , " try " ] ,
80+ languageVersion: VersionTuple ( 6 ) ,
81+ compilerVersion: VersionTuple ( 6 , 2 )
82+ )
7583
7684 assertIfConfig ( " DEBUG " , . active, configuration: buildConfig)
7785 assertIfConfig ( " NODEBUG " , . inactive, configuration: buildConfig)
@@ -136,7 +144,11 @@ public class EvaluateTests: XCTestCase {
136144 }
137145
138146 func testBadExpressions( ) throws {
139- let buildConfig = StaticBuildConfiguration ( customConditions: [ " DEBUG " , " ASSERTS " ] )
147+ let buildConfig = StaticBuildConfiguration (
148+ customConditions: [ " DEBUG " , " ASSERTS " ] ,
149+ languageVersion: VersionTuple ( 6 ) ,
150+ compilerVersion: VersionTuple ( 6 , 2 )
151+ )
140152
141153 assertIfConfig (
142154 " 3.14159 " ,
@@ -178,14 +190,22 @@ public class EvaluateTests: XCTestCase {
178190 }
179191
180192 func testFeatures( ) throws {
181- let buildConfig = StaticBuildConfiguration ( features: [ " ParameterPacks " ] )
193+ let buildConfig = StaticBuildConfiguration (
194+ features: [ " ParameterPacks " ] ,
195+ languageVersion: VersionTuple ( 6 ) ,
196+ compilerVersion: VersionTuple ( 6 , 2 )
197+ )
182198
183199 assertIfConfig ( " hasFeature(ParameterPacks) " , . active, configuration: buildConfig)
184200 assertIfConfig ( " hasFeature(HigherKindedGenerics) " , . inactive, configuration: buildConfig)
185201 }
186202
187203 func testAttributes( ) throws {
188- let buildConfig = StaticBuildConfiguration ( attributes: [ " available " ] )
204+ let buildConfig = StaticBuildConfiguration (
205+ attributes: [ " available " ] ,
206+ languageVersion: VersionTuple ( 6 ) ,
207+ compilerVersion: VersionTuple ( 6 , 2 )
208+ )
189209
190210 assertIfConfig ( " hasAttribute(available) " , . active, configuration: buildConfig)
191211 assertIfConfig ( " hasAttribute(unsafeUnavailable) " , . inactive, configuration: buildConfig)
@@ -533,7 +553,11 @@ public class EvaluateTests: XCTestCase {
533553 assertIfConfig (
534554 " defined(FOO) " ,
535555 . active,
536- configuration: StaticBuildConfiguration ( customConditions: [ " FOO " ] ) ,
556+ configuration: StaticBuildConfiguration (
557+ customConditions: [ " FOO " ] ,
558+ languageVersion: VersionTuple ( 6 ) ,
559+ compilerVersion: VersionTuple ( 6 , 2 )
560+ ) ,
537561 diagnostics: [
538562 DiagnosticSpec (
539563 message: message,
0 commit comments