Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: test/initializer_super_test.dart

Issue 1006513003: make sure we follow the whole super chain (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: format Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/initializer_parts_test.dart ('k') | tool/all_tests.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/initializer_super_test.dart
diff --git a/test/initializer_parts_test.dart b/test/initializer_super_test.dart
similarity index 62%
copy from test/initializer_parts_test.dart
copy to test/initializer_super_test.dart
index bfba5e80df3cf469517b228f6db51e45c648f5f0..66e6e76cf3fed20192baf8995636aa09abf0584f 100644
--- a/test/initializer_parts_test.dart
+++ b/test/initializer_super_test.dart
@@ -1,41 +1,36 @@
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@initializeTracker
-library initialize.initializer_parts_test;
+library initialize.initializer_super_test;
import 'package:initialize/src/initialize_tracker.dart';
import 'package:initialize/initialize.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/compact_vm_config.dart';
-part 'parts/foo.dart';
-part 'parts/bar.dart';
-
main() {
useCompactVMConfiguration();
// Run all initializers.
run().then((_) {
- test('parts', () {
- var expectedNames = [
- const LibraryIdentifier(#initialize.initializer_parts_test, null, 'initializer_parts_test.dart'),
- bar2,
- bar,
- foo,
- baz,
- Bar2,
- Bar,
- Foo,
- Baz,
- ];
+ test('annotations are seen in post-order with superclasses first', () {
+ var expectedNames = [A, C, B, E, D,];
expect(InitializeTracker.seen, expectedNames);
});
});
}
@initializeTracker
-class Baz {}
+class D extends E {}
+
+@initializeTracker
+class E extends B {}
+
+@initializeTracker
+class B extends C {}
+
+@initializeTracker
+class C extends A {}
@initializeTracker
-baz() {}
+class A {}
« no previous file with comments | « test/initializer_parts_test.dart ('k') | tool/all_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698