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

Side by Side Diff: tests/compiler/dart2js_extra/deferred_inheritance_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Regression test for --fast-startup. The compiler used to emit inherit calls 5 /// Regression test for --fast-startup. The compiler used to emit inherit calls
6 /// on each fragment even for classes that were already loaded on a different 6 /// on each fragment even for classes that were already loaded on a different
7 /// fragment. As a result, the inheritance chain was overwritten in non-chrome 7 /// fragment. As a result, the inheritance chain was overwritten in non-chrome
8 /// browsers (by using __proto__, we evaded this issue in Chrome). 8 /// browsers (by using __proto__, we evaded this issue in Chrome).
9 library deferred_inheritance_test; 9 library deferred_inheritance_test;
10 10
11 import 'deferred_inheritance_lib2.dart'; 11 import 'deferred_inheritance_lib2.dart';
12 import 'deferred_inheritance_lib1.dart' deferred as d; 12 import 'deferred_inheritance_lib1.dart' deferred as d;
13 13
14 import 'package:expect/expect.dart'; 14 import 'package:expect/expect.dart';
15 15
16 class B extends A {} 16 class B extends A {}
17 17
18 /// If the check `y is A` is generated as `y.$isA` then the issue is not 18 /// If the check `y is A` is generated as `y.$isA` then the issue is not
19 /// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof 19 /// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
20 /// A` in JS. 20 /// A` in JS.
21 @NoInline() @AssumeDynamic() 21 @NoInline()
22 @AssumeDynamic()
22 check(y) => Expect.isTrue(y is A); 23 check(y) => Expect.isTrue(y is A);
23 24
24 main() { 25 main() {
25 check(new B()); 26 check(new B());
26 d.loadLibrary().then((_) { 27 d.loadLibrary().then((_) {
27 check(new d.C()); 28 check(new d.C());
28 check(new B()); // This fails if we overwrite the inheritance chain. 29 check(new B()); // This fails if we overwrite the inheritance chain.
29 }); 30 });
30 } 31 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/deferred_fail_and_retry_worker_test.dart ('k') | tests/compiler/dart2js_extra/do_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698