@@ -113,21 +113,21 @@ final class IndexTests: XCTestCase {
113
113
checkOccurrences ( cdeclOccs, expected: [
114
114
cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
115
115
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) ,
117
117
cdecl. at ( ws. testLoc ( " C:ref:e.mm " ) , roles: . reference) ,
118
118
] )
119
119
120
120
let cmethod = Symbol ( usr: " c:objc(cs)C(im)method " , name: " method " , kind: . instanceMethod, language: . objc)
121
121
let cmethodOccs = index. occurrences ( ofUSR: cmethod. usr, roles: . all)
122
122
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] ) ,
124
124
cmethod. at ( ws. testLoc ( " C.method:decl " ) , roles: . declaration) ,
125
125
cmethod. at ( ws. testLoc ( " C.method:def " ) , roles: . definition) ,
126
126
cmethod. at ( ws. testLoc ( " C.method:call:e.mm " ) , roles: [ . call, . dynamic] ) ,
127
127
] )
128
128
#endif
129
129
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 )
131
131
let dOccs = index. occurrences ( ofUSR: ddecl. usr, roles: . all)
132
132
checkOccurrences ( dOccs, expected: [
133
133
ddecl. at ( ws. testLoc ( " D:def " ) , roles: . definition) ,
@@ -139,7 +139,7 @@ final class IndexTests: XCTestCase {
139
139
let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
140
140
checkOccurrences ( bridgingHeaderOccs, expected: [
141
141
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) ,
143
143
] )
144
144
}
145
145
@@ -154,18 +154,18 @@ final class IndexTests: XCTestCase {
154
154
let index = ws. index
155
155
156
156
#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 )
158
158
let cdeclOccs = index. occurrences ( ofUSR: cdecl. usr, roles: . all)
159
159
checkOccurrences ( cdeclOccs, expected: [
160
160
cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
161
161
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) ,
163
163
] )
164
164
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 )
166
166
let cmethodOccs = index. occurrences ( ofUSR: cmethod. usr, roles: . all)
167
167
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] ) ,
169
169
cmethod. at ( ws. testLoc ( " C.method:decl " ) , roles: . declaration) ,
170
170
cmethod. at ( ws. testLoc ( " C.method:def " ) , roles: . definition) ,
171
171
] )
@@ -175,7 +175,7 @@ final class IndexTests: XCTestCase {
175
175
let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
176
176
checkOccurrences ( bridgingHeaderOccs, expected: [
177
177
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) ,
179
179
] )
180
180
}
181
181
@@ -191,7 +191,7 @@ final class IndexTests: XCTestCase {
191
191
let index = ws. index
192
192
193
193
#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 )
195
195
let getOccs = { index. occurrences ( ofUSR: cdecl. usr, roles: . all) }
196
196
197
197
// Output units are not set yet.
@@ -209,13 +209,13 @@ final class IndexTests: XCTestCase {
209
209
let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
210
210
checkOccurrences ( bridgingHeaderOccs, expected: [
211
211
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) ,
213
213
] )
214
214
#if os(macOS)
215
215
checkOccurrences ( getOccs ( ) , expected: [
216
216
cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
217
217
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) ,
219
219
] )
220
220
221
221
let outUnitASwift = try XCTUnwrap ( indexOutputPaths. first { $0. hasSuffix ( " -a.swift.o " ) } )
@@ -239,7 +239,7 @@ final class IndexTests: XCTestCase {
239
239
let index = ws. index
240
240
241
241
#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 )
243
243
let getOccs = { index. occurrences ( ofUSR: cdecl. usr, roles: . all) }
244
244
245
245
// Output units are not set yet.
@@ -257,13 +257,13 @@ final class IndexTests: XCTestCase {
257
257
let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
258
258
checkOccurrences ( bridgingHeaderOccs, expected: [
259
259
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) ,
261
261
] )
262
262
#if os(macOS)
263
263
checkOccurrences ( getOccs ( ) , expected: [
264
264
cdecl. at ( ws. testLoc ( " C:decl " ) , roles: [ . declaration, . canonical] ) ,
265
265
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) ,
267
267
] )
268
268
269
269
let outUnitASwift = try XCTUnwrap ( indexOutputPaths. first { $0. hasSuffix ( " -a.swift.o " ) } )
@@ -547,7 +547,7 @@ final class IndexTests: XCTestCase {
547
547
try ws. buildAndIndex ( )
548
548
let index = ws. index
549
549
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 )
551
551
let getOccs = { index. occurrences ( ofUSR: ddecl. usr, roles: . all) }
552
552
553
553
// Output units are not set yet.
@@ -573,7 +573,7 @@ final class IndexTests: XCTestCase {
573
573
let bridgingHeaderOccs = index. occurrences ( ofUSR: bhdecl. usr, roles: . all)
574
574
checkOccurrences ( bridgingHeaderOccs, expected: [
575
575
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) ,
577
577
] )
578
578
}
579
579
@@ -665,7 +665,7 @@ final class IndexTests: XCTestCase {
665
665
666
666
try ws. buildAndIndex ( )
667
667
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 )
669
669
let largeTypeOccs = ws. index. occurrences ( ofUSR: largeType. usr, roles: . all)
670
670
checkOccurrences ( largeTypeOccs, expected: [
671
671
largeType. at ( ws. testLoc ( " LargeType:def " ) , roles: . definition) ,
0 commit comments