Index: pkg/front_end/test/src/incremental/file_state_test.dart |
diff --git a/pkg/front_end/test/src/incremental/file_state_test.dart b/pkg/front_end/test/src/incremental/file_state_test.dart |
index 9e9f391cdbb9f3246d7f021711017fc15b8ad3d5..7232e95bc0ebf78491ab51c13cb13bbe98c37485 100644 |
--- a/pkg/front_end/test/src/incremental/file_state_test.dart |
+++ b/pkg/front_end/test/src/incremental/file_state_test.dart |
@@ -284,6 +284,116 @@ export "c.dart" show A, B, C, D hide C show A, D; |
} |
} |
+ test_hasMixinApplication_false() async { |
+ writeFile( |
+ '/a.dart', |
+ r''' |
+class A {} |
+class B extends Object with A {} |
+'''); |
+ var uri = writeFile( |
+ '/test.dart', |
+ r''' |
+import 'a.dart'; |
+class T1 extends A {} |
+class T2 extends B {} |
+'''); |
+ FileState file = await fsState.getFile(uri); |
+ expect(file.hasMixinApplication, isFalse); |
+ } |
+ |
+ test_hasMixinApplication_true_class() async { |
+ var uri = writeFile( |
+ '/test.dart', |
+ r''' |
+class A {} |
+class B extends Object with A {} |
+'''); |
+ FileState file = await fsState.getFile(uri); |
+ expect(file.hasMixinApplication, isTrue); |
+ } |
+ |
+ test_hasMixinApplication_true_named() async { |
+ var uri = writeFile( |
+ '/test.dart', |
+ r''' |
+class A {} |
+class B = Object with A; |
+'''); |
+ FileState file = await fsState.getFile(uri); |
+ expect(file.hasMixinApplication, isTrue); |
+ } |
+ |
+ test_hasMixinApplicationLibrary_false() async { |
+ var partUri = writeFile( |
+ '/part.dart', |
+ r''' |
+part of test; |
+class A {} |
+'''); |
+ var libUri = writeFile( |
+ '/test.dart', |
+ r''' |
+library test; |
+part 'part.dart'; |
+class B extends A {} |
+'''); |
+ |
+ FileState part = await fsState.getFile(partUri); |
+ FileState lib = await fsState.getFile(libUri); |
+ |
+ expect(part.hasMixinApplication, isFalse); |
+ expect(lib.hasMixinApplication, isFalse); |
+ expect(lib.hasMixinApplicationLibrary, isFalse); |
+ } |
+ |
+ test_hasMixinApplicationLibrary_true_inDefiningUnit() async { |
+ var partUri = writeFile( |
+ '/part.dart', |
+ r''' |
+part of test; |
+class A {} |
+'''); |
+ var libUri = writeFile( |
+ '/test.dart', |
+ r''' |
+library test; |
+part 'part.dart'; |
+class B extends Object with A {} |
+'''); |
+ |
+ FileState part = await fsState.getFile(partUri); |
+ FileState lib = await fsState.getFile(libUri); |
+ |
+ expect(part.hasMixinApplication, isFalse); |
+ expect(lib.hasMixinApplication, isTrue); |
+ expect(lib.hasMixinApplicationLibrary, isTrue); |
+ } |
+ |
+ test_hasMixinApplicationLibrary_true_inPart() async { |
+ var partUri = writeFile( |
+ '/part.dart', |
+ r''' |
+part of test; |
+class A {} |
+class B extends Object with A {} |
+'''); |
+ var libUri = writeFile( |
+ '/test.dart', |
+ r''' |
+library test; |
+part 'part.dart'; |
+class C {} |
+'''); |
+ |
+ FileState part = await fsState.getFile(partUri); |
+ FileState lib = await fsState.getFile(libUri); |
+ |
+ expect(part.hasMixinApplication, isTrue); |
+ expect(lib.hasMixinApplication, isFalse); |
+ expect(lib.hasMixinApplicationLibrary, isTrue); |
+ } |
+ |
test_newFileListener() async { |
var a = writeFile('/a.dart', ''); |
var b = writeFile('/b.dart', ''); |