@@ -115,9 +115,10 @@ extension StructuredSwiftTests {
115115 }
116116
117117 @Test (
118- " preconcurrency import rendering "
118+ " preconcurrency import rendering " ,
119+ arguments: allAccessLevels
119120 )
120- func preconcurrencyImports( ) throws {
121+ func preconcurrencyImports( accessLevel : SourceGenerator . Config . AccessLevel ) throws {
121122 var dependencies = [ Dependency] ( )
122123 dependencies. append (
123124 Dependency (
@@ -144,7 +145,7 @@ extension StructuredSwiftTests {
144145
145146 let expected =
146147 """
147- public import GRPCCore
148+ \( accessLevel . level ) import GRPCCore
148149 @preconcurrency internal import Foo
149150 @preconcurrency internal import enum Foo.Bar
150151 #if os(Deq) || os(Der)
@@ -156,17 +157,18 @@ extension StructuredSwiftTests {
156157
157158 let imports = try StructuredSwiftTests . Import. translator. makeImports (
158159 dependencies: dependencies,
159- accessLevel: . public ,
160+ accessLevel: accessLevel ,
160161 accessLevelOnImports: true
161162 )
162163
163164 #expect( render ( imports) == expected)
164165 }
165166
166167 @Test (
167- " SPI import rendering "
168+ " SPI import rendering " ,
169+ arguments: allAccessLevels
168170 )
169- func spiImports( ) throws {
171+ func spiImports( accessLevel : SourceGenerator . Config . AccessLevel ) throws {
170172 var dependencies = [ Dependency] ( )
171173 dependencies. append (
172174 Dependency ( module: " Foo " , spi: " Secret " , accessLevel: . internal)
@@ -182,14 +184,14 @@ extension StructuredSwiftTests {
182184
183185 let expected =
184186 """
185- public import GRPCCore
187+ \( accessLevel . level ) import GRPCCore
186188 @_spi(Secret) internal import Foo
187189 @_spi(Secret) internal import enum Foo.Bar
188190 """
189191
190192 let imports = try StructuredSwiftTests . Import. translator. makeImports (
191193 dependencies: dependencies,
192- accessLevel: . public ,
194+ accessLevel: accessLevel ,
193195 accessLevelOnImports: true
194196 )
195197
0 commit comments