@@ -113,21 +113,21 @@ final class IndexTests: XCTestCase {
113113 checkOccurrences ( cdeclOccs, expected: [
114114 cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
115115 cdecl. at ( ws. testLoc ( " C:def " ) , roles: . definition) ,
116- cdecl. at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
116+ cdecl. with ( language : . swift ) . at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
117117 cdecl. at ( ws. testLoc ( " C:ref:e.mm " ) , roles: . reference) ,
118118 ] )
119119
120120 let cmethod = Symbol ( usr: " c:objc(cs)C(im)method " , name: " method " , kind: . instanceMethod, language: . objc)
121121 let cmethodOccs = index. occurrences ( ofUSR: cmethod. usr, roles: . all)
122122 checkOccurrences ( cmethodOccs, expected: [
123- cmethod. with ( name: " method() " ) . at ( ws. testLoc ( " C.method:call:swift " ) , roles: [ . call, . dynamic] ) ,
123+ cmethod. with ( name: " method() " , language : . swift ) . at ( ws. testLoc ( " C.method:call:swift " ) , roles: [ . call, . dynamic] ) ,
124124 cmethod. at ( ws. testLoc ( " C.method:decl " ) , roles: . declaration) ,
125125 cmethod. at ( ws. testLoc ( " C.method:def " ) , roles: . definition) ,
126126 cmethod. at ( ws. testLoc ( " C.method:call:e.mm " ) , roles: [ . call, . dynamic] ) ,
127127 ] )
128128 #endif
129129
130- let ddecl = Symbol ( usr: " c:@S@D " , name: " D " , kind: . class, language: . c )
130+ let ddecl = Symbol ( usr: " c:@S@D " , name: " D " , kind: . class, language: . cxx )
131131 let dOccs = index. occurrences ( ofUSR: ddecl. usr, roles: . all)
132132 checkOccurrences ( dOccs, expected: [
133133 ddecl. at ( ws. testLoc ( " D:def " ) , roles: . definition) ,
@@ -139,7 +139,7 @@ final class IndexTests: XCTestCase {
139139 let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
140140 checkOccurrences ( bridgingHeaderOccs, expected: [
141141 bhdecl. at ( ws. testLoc ( " bridgingHeader:decl " ) , roles: . declaration) ,
142- bhdecl. with ( name: " bridgingHeader() " ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
142+ bhdecl. with ( name: " bridgingHeader() " , language : . swift ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
143143 ] )
144144 }
145145
@@ -154,18 +154,18 @@ final class IndexTests: XCTestCase {
154154 let index = ws. index
155155
156156 #if os(macOS)
157- let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . c )
157+ let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . objc )
158158 let cdeclOccs = index. occurrences ( ofUSR: cdecl. usr, roles: . all)
159159 checkOccurrences ( cdeclOccs, expected: [
160160 cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
161161 cdecl. at ( ws. testLoc ( " C:def " ) , roles: . definition) ,
162- cdecl. at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
162+ cdecl. with ( language : . swift ) . at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
163163 ] )
164164
165- let cmethod = Symbol ( usr: " c:objc(cs)C(im)method " , name: " method " , kind: . instanceMethod, language: . c )
165+ let cmethod = Symbol ( usr: " c:objc(cs)C(im)method " , name: " method " , kind: . instanceMethod, language: . objc )
166166 let cmethodOccs = index. occurrences ( ofUSR: cmethod. usr, roles: . all)
167167 checkOccurrences ( cmethodOccs, expected: [
168- cmethod. with ( name: " method() " ) . at ( ws. testLoc ( " C.method:call:swift " ) , roles: [ . call, . dynamic] ) ,
168+ cmethod. with ( name: " method() " , language : . swift ) . at ( ws. testLoc ( " C.method:call:swift " ) , roles: [ . call, . dynamic] ) ,
169169 cmethod. at ( ws. testLoc ( " C.method:decl " ) , roles: . declaration) ,
170170 cmethod. at ( ws. testLoc ( " C.method:def " ) , roles: . definition) ,
171171 ] )
@@ -175,7 +175,7 @@ final class IndexTests: XCTestCase {
175175 let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
176176 checkOccurrences ( bridgingHeaderOccs, expected: [
177177 bhdecl. at ( ws. testLoc ( " bridgingHeader:decl " ) , roles: . declaration) ,
178- bhdecl. with ( name: " bridgingHeader() " ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
178+ bhdecl. with ( name: " bridgingHeader() " , language : . swift ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
179179 ] )
180180 }
181181
@@ -191,7 +191,7 @@ final class IndexTests: XCTestCase {
191191 let index = ws. index
192192
193193 #if os(macOS)
194- let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . c )
194+ let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . objc )
195195 let getOccs = { index. occurrences ( ofUSR: cdecl. usr, roles: . all) }
196196
197197 // Output units are not set yet.
@@ -209,13 +209,13 @@ final class IndexTests: XCTestCase {
209209 let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
210210 checkOccurrences ( bridgingHeaderOccs, expected: [
211211 bhdecl. at ( ws. testLoc ( " bridgingHeader:decl " ) , roles: . declaration) ,
212- bhdecl. with ( name: " bridgingHeader() " ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
212+ bhdecl. with ( name: " bridgingHeader() " , language : . swift ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
213213 ] )
214214 #if os(macOS)
215215 checkOccurrences ( getOccs ( ) , expected: [
216216 cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
217217 cdecl. at ( ws. testLoc ( " C:def " ) , roles: . definition) ,
218- cdecl. at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
218+ cdecl. with ( language : . swift ) . at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
219219 ] )
220220
221221 let outUnitASwift = try XCTUnwrap ( indexOutputPaths. first { $0. hasSuffix ( " -a.swift.o " ) } )
@@ -239,7 +239,7 @@ final class IndexTests: XCTestCase {
239239 let index = ws. index
240240
241241 #if os(macOS)
242- let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . c )
242+ let cdecl = Symbol ( usr: " c:objc(cs)C " , name: " C " , kind: . class, language: . objc )
243243 let getOccs = { index. occurrences ( ofUSR: cdecl. usr, roles: . all) }
244244
245245 // Output units are not set yet.
@@ -257,13 +257,13 @@ final class IndexTests: XCTestCase {
257257 let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
258258 checkOccurrences ( bridgingHeaderOccs, expected: [
259259 bhdecl. at ( ws. testLoc ( " bridgingHeader:decl " ) , roles: . declaration) ,
260- bhdecl. with ( name: " bridgingHeader() " ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
260+ bhdecl. with ( name: " bridgingHeader() " , language : . swift ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
261261 ] )
262262 #if os(macOS)
263263 checkOccurrences ( getOccs ( ) , expected: [
264264 cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
265265 cdecl. at ( ws. testLoc ( " C:def " ) , roles: . definition) ,
266- cdecl. at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
266+ cdecl. with ( language : . swift ) . at ( ws. testLoc ( " C:ref:swift " ) , roles: . reference) ,
267267 ] )
268268
269269 let outUnitASwift = try XCTUnwrap ( indexOutputPaths. first { $0. hasSuffix ( " -a.swift.o " ) } )
@@ -547,7 +547,7 @@ final class IndexTests: XCTestCase {
547547 try ws. buildAndIndex ( )
548548 let index = ws. index
549549
550- let ddecl = Symbol ( usr: " c:@S@D " , name: " D " , kind: . class, language: . c )
550+ let ddecl = Symbol ( usr: " c:@S@D " , name: " D " , kind: . class, language: . cxx )
551551 let getOccs = { index. occurrences ( ofUSR: ddecl. usr, roles: . all) }
552552
553553 // Output units are not set yet.
@@ -573,7 +573,7 @@ final class IndexTests: XCTestCase {
573573 let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
574574 checkOccurrences ( bridgingHeaderOccs, expected: [
575575 bhdecl. at ( ws. testLoc ( " bridgingHeader:decl " ) , roles: . declaration) ,
576- bhdecl. with ( name: " bridgingHeader() " ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
576+ bhdecl. with ( name: " bridgingHeader() " , language : . swift ) . at ( ws. testLoc ( " bridgingHeader:call " ) , roles: . call) ,
577577 ] )
578578 }
579579
@@ -665,7 +665,7 @@ final class IndexTests: XCTestCase {
665665
666666 try ws. buildAndIndex ( )
667667
668- let largeType = Symbol ( usr: " c:@CT@LargeType " , name: " LargeType " , kind: . concept, language: . cxx )
668+ let largeType = Symbol ( usr: " c:@CT@LargeType " , name: " LargeType " , kind: . concept, language: . c )
669669 let largeTypeOccs = ws. index. occurrences ( ofUSR: largeType. usr, roles: . all)
670670 checkOccurrences ( largeTypeOccs, expected: [
671671 largeType. at ( ws. testLoc ( " LargeType:def " ) , roles: . definition) ,
0 commit comments