11import SwiftDiagnostics
22import SwiftSyntax
33import SwiftSyntaxMacroExpansion
4- import SwiftSyntaxMacros
5- import SwiftSyntaxMacrosTestSupport
4+ import SwiftSyntaxMacrosGenericTestSupport
65import Testing
76import BridgeJSMacros
87
@@ -13,14 +12,15 @@ import BridgeJSMacros
1312 ]
1413
1514 @Test func emptyStruct( ) {
16- assertMacroExpansion (
15+ TestSupport . assertMacroExpansion (
1716 """
1817 @JSClass
1918 struct MyClass {
2019 }
2120 """ ,
2221 expandedSource: """
2322 struct MyClass {
23+
2424 let jsObject: JSObject
2525
2626 init(unsafelyWrapping jsObject: JSObject) {
@@ -32,12 +32,12 @@ import BridgeJSMacros
3232 }
3333 """ ,
3434 macroSpecs: macroSpecs,
35- indentationWidth: indentationWidth
35+ indentationWidth: indentationWidth,
3636 )
3737 }
3838
3939 @Test func structWithExistingJSObject( ) {
40- assertMacroExpansion (
40+ TestSupport . assertMacroExpansion (
4141 """
4242 @JSClass
4343 struct MyClass {
@@ -62,7 +62,7 @@ import BridgeJSMacros
6262 }
6363
6464 @Test func structWithExistingInit( ) {
65- assertMacroExpansion (
65+ TestSupport . assertMacroExpansion (
6666 """
6767 @JSClass
6868 struct MyClass {
@@ -89,7 +89,7 @@ import BridgeJSMacros
8989 }
9090
9191 @Test func structWithBothExisting( ) {
92- assertMacroExpansion (
92+ TestSupport . assertMacroExpansion (
9393 """
9494 @JSClass
9595 struct MyClass {
@@ -118,7 +118,7 @@ import BridgeJSMacros
118118 }
119119
120120 @Test func structWithMembers( ) {
121- assertMacroExpansion (
121+ TestSupport . assertMacroExpansion (
122122 """
123123 @JSClass
124124 struct MyClass {
@@ -145,7 +145,7 @@ import BridgeJSMacros
145145 }
146146
147147 @Test func _class( ) {
148- assertMacroExpansion (
148+ TestSupport . assertMacroExpansion (
149149 """
150150 @JSClass
151151 class MyClass {
@@ -168,7 +168,7 @@ import BridgeJSMacros
168168 }
169169
170170 @Test func _enum( ) {
171- assertMacroExpansion (
171+ TestSupport . assertMacroExpansion (
172172 """
173173 @JSClass
174174 enum MyEnum {
@@ -191,7 +191,7 @@ import BridgeJSMacros
191191 }
192192
193193 @Test func _actor( ) {
194- assertMacroExpansion (
194+ TestSupport . assertMacroExpansion (
195195 """
196196 @JSClass
197197 actor MyActor {
@@ -214,7 +214,7 @@ import BridgeJSMacros
214214 }
215215
216216 @Test func structWithDifferentJSObjectName( ) {
217- assertMacroExpansion (
217+ TestSupport . assertMacroExpansion (
218218 """
219219 @JSClass
220220 struct MyClass {
@@ -241,7 +241,7 @@ import BridgeJSMacros
241241 }
242242
243243 @Test func structWithDifferentInit( ) {
244- assertMacroExpansion (
244+ TestSupport . assertMacroExpansion (
245245 """
246246 @JSClass
247247 struct MyClass {
@@ -270,7 +270,7 @@ import BridgeJSMacros
270270 }
271271
272272 @Test func structWithMultipleMembers( ) {
273- assertMacroExpansion (
273+ TestSupport . assertMacroExpansion (
274274 """
275275 @JSClass
276276 struct MyClass {
@@ -299,7 +299,7 @@ import BridgeJSMacros
299299 }
300300
301301 @Test func structWithComment( ) {
302- assertMacroExpansion (
302+ TestSupport . assertMacroExpansion (
303303 """
304304 /// Documentation comment
305305 @JSClass
@@ -325,7 +325,7 @@ import BridgeJSMacros
325325 }
326326
327327 @Test func structAlreadyConforms( ) {
328- assertMacroExpansion (
328+ TestSupport . assertMacroExpansion (
329329 """
330330 @JSClass
331331 struct MyClass: _JSBridgedClass {
0 commit comments