@@ -63,13 +63,6 @@ enum ResultExpectation {
63
63
expectedNames
64
64
}
65
65
}
66
-
67
- static func == ( lhs: ResultExpectation , rhs: LookupResult ) -> Bool {
68
- switch ( lhs, rhs) {
69
- case ( . fromScope, . fromScope) :
70
- return true
71
- }
72
- }
73
66
}
74
67
75
68
/// `methodUnderTest` is called with the token at every position marker in the keys of `expected`.
@@ -164,24 +157,17 @@ func assertLexicalNameLookup(
164
157
let result = argument. lookup ( for: useNilAsTheParameter ? nil : argument. text)
165
158
166
159
guard let expectedValues = references [ marker] else {
167
- XCTFail ( " For marker \( marker) , couldn't find expectation " )
160
+ XCTFail ( " For marker \( marker) , couldn't find result expectation " )
168
161
return [ ]
169
162
}
170
163
171
164
for (actual, expected) in zip ( result, expectedValues) {
172
- XCTAssert (
173
- expected == actual,
174
- " For marker \( marker) , expected actual result \( actual) doesn't match expected \( expected) "
175
- )
176
-
177
- switch actual {
178
- case . fromScope( let scope, withNames: _) :
179
- if case . fromScope( let expectedType, expectedNames: _) = expected {
180
- XCTAssert (
181
- scope. syntaxNodeType == expectedType,
182
- " For marker \( marker) , scope result type of \( scope. syntaxNodeType) doesn't match expected \( expectedType) "
183
- )
184
- }
165
+ switch ( actual, expected) {
166
+ case ( . fromScope( let scope, withNames: _) , . fromScope( let expectedType, expectedNames: _) ) :
167
+ XCTAssert (
168
+ scope. syntaxNodeType == expectedType,
169
+ " For marker \( marker) , scope result type of \( scope. syntaxNodeType) doesn't match expected \( expectedType) "
170
+ )
185
171
}
186
172
}
187
173
0 commit comments