2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
- // ignore_for_file: analyzer_use_new_elements
6
-
7
5
import 'package:analyzer/src/dart/resolver/scope.dart' ;
8
6
import 'package:analyzer/src/error/codes.dart' ;
9
7
import 'package:test/test.dart' ;
@@ -25,24 +23,24 @@ import 'dart:math' as prefix;
25
23
''' , [
26
24
error (WarningCode .UNUSED_IMPORT , 7 , 11 ),
27
25
]);
28
- var namespace = findElement .import ('dart:math' ).namespace;
26
+ var namespace = findElement2 .import ('dart:math' ).namespace;
29
27
return namespace as PrefixedNamespace ;
30
28
}
31
29
32
30
void test_lookup_missing () async {
33
31
var namespace = await _dartMath;
34
- expect (namespace.get ('prefix.Missing' ), isNull);
32
+ expect (namespace.get2 ('prefix.Missing' ), isNull);
35
33
}
36
34
37
35
Future <void > test_lookup_missing_matchesPrefix () async {
38
36
var namespace = await _dartMath;
39
- expect (namespace.get ('prefix' ), isNull);
37
+ expect (namespace.get2 ('prefix' ), isNull);
40
38
}
41
39
42
40
Future <void > test_lookup_valid () async {
43
41
var namespace = await _dartMath;
44
42
45
- var random = findElement .importFind ('dart:math' ).class_ ('Random' );
46
- expect (namespace.get ('prefix.Random' ), same (random));
43
+ var random = findElement2 .importFind ('dart:math' ).class_ ('Random' );
44
+ expect (namespace.get2 ('prefix.Random' ), same (random));
47
45
}
48
46
}
0 commit comments