@@ -2217,16 +2217,12 @@ void main() {
22172217 MatchingLinkResult bothLookup (Warnable element, String codeRef) {
22182218 var originalLookupResult = originalLookup (element, codeRef);
22192219 var newLookupResult = newLookup (element, codeRef);
2220- expect (newLookupResult, equals (originalLookupResult));
2220+ expect (newLookupResult. isEquivalentTo (originalLookupResult), isTrue );
22212221 return newLookupResult;
22222222 }
22232223
22242224 test ('Verify basic linking inside class' , () {
2225- // parameter of [doAwesomeStuff]
2226- // Parameter lookups are discarded with the original lookup code
2227- expect (originalLookup (doAwesomeStuff, 'value' ),
2228- equals (MatchingLinkResult (null , warn: false )));
2229- expect (newLookup (doAwesomeStuff, 'value' ),
2225+ expect (bothLookup (doAwesomeStuff, 'value' ),
22302226 equals (MatchingLinkResult (doAwesomeStuffParam)));
22312227
22322228 // Parent class of [doAwesomeStuff].
@@ -2240,37 +2236,31 @@ void main() {
22402236 equals (MatchingLinkResult (nameWithSingleUnderscore)));
22412237
22422238 // Top level class from [dart:core].
2243- // TODO(jcollins-g): dart:core not recognized yet with new lookup code.
2244- expect (originalLookup (doAwesomeStuff, 'String' ),
2239+ expect (bothLookup (doAwesomeStuff, 'String' ),
22452240 equals (MatchingLinkResult (string)));
22462241
22472242 // Another method in the same class.
22482243 expect (bothLookup (doAwesomeStuff, 'anotherMethod' ),
22492244 equals (MatchingLinkResult (anotherMethod)));
22502245
22512246 // A top level function in this library.
2252- // TODO(jcollins-g): top level functions not recognized yet with new lookup code.
2253- expect (originalLookup (doAwesomeStuff, 'topLevelFunction' ),
2247+ expect (bothLookup (doAwesomeStuff, 'topLevelFunction' ),
22542248 equals (MatchingLinkResult (topLevelFunction)));
22552249
22562250 // A top level function in another library imported into this library.
2257- // TODO(jcollins-g): namespace lookups are not yet implemented with new lookup code.
2258- expect (originalLookup (doAwesomeStuff, 'function1' ),
2251+ expect (bothLookup (doAwesomeStuff, 'function1' ),
22592252 equals (MatchingLinkResult (function1)));
22602253
22612254 // A class in another library imported into this library.
2262- // TODO(jcollins-g): namespace lookups are not yet implemented with new lookup code.
2263- expect (originalLookup (doAwesomeStuff, 'Apple' ),
2255+ expect (bothLookup (doAwesomeStuff, 'Apple' ),
22642256 equals (MatchingLinkResult (Apple )));
22652257
22662258 // A top level constant in this library sharing the same name as a name in another library.
2267- // TODO(jcollins-g): namespace lookups are not yet implemented with new lookup code.
2268- expect (originalLookup (doAwesomeStuff, 'incorrectDocReference' ),
2259+ expect (bothLookup (doAwesomeStuff, 'incorrectDocReference' ),
22692260 equals (MatchingLinkResult (incorrectDocReference)));
22702261
22712262 // A top level constant in another library.
2272- // TODO(jcollins-g): namespace lookups are not yet implemented with new lookup code.
2273- expect (originalLookup (doAwesomeStuff, 'incorrectDocReferenceFromEx' ),
2263+ expect (bothLookup (doAwesomeStuff, 'incorrectDocReferenceFromEx' ),
22742264 equals (MatchingLinkResult (incorrectDocReferenceFromEx)));
22752265
22762266 // A prefixed constant in another library.
@@ -2284,7 +2274,7 @@ void main() {
22842274 equals (MatchingLinkResult (doesStuff)));
22852275
22862276 // A name of a class from an import of a library that exported that name.
2287- expect (originalLookup (doAwesomeStuff, 'BaseClass' ),
2277+ expect (bothLookup (doAwesomeStuff, 'BaseClass' ),
22882278 equals (MatchingLinkResult (BaseClass )));
22892279
22902280 // A bracket operator within this class.
0 commit comments