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

Side by Side Diff: tests/compiler/dart2js_native/abstract_class_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "dart:_js_helper"; 5 import "dart:_js_helper";
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 7
8 // Native classes can have subclasses that are not declared to the program. The 8 // Native classes can have subclasses that are not declared to the program. The
9 // subclasses are indistinguishable from the base class. This means that 9 // subclasses are indistinguishable from the base class. This means that
10 // abstract native classes can appear to have instances. 10 // abstract native classes can appear to have instances.
11 11
12 @Native("A") 12 @Native("A")
13 abstract class A { 13 abstract class A {}
14 }
15 14
16 @Native("B") 15 @Native("B")
17 abstract class B { 16 abstract class B {
18 foo() native; 17 foo() native ;
19 } 18 }
20 19
21 class C {} 20 class C {}
22 21
23 makeA() native; 22 makeA() native ;
24 makeB() native; 23 makeB() native ;
25 24
26 void setup() native """ 25 void setup() native """
27 // This code is all inside 'setup' and so not accesible from the global scope. 26 // This code is all inside 'setup' and so not accesible from the global scope.
28 function A(){} 27 function A(){}
29 function B(){} 28 function B(){}
30 B.prototype.foo = function() { return 'B.foo'; }; 29 B.prototype.foo = function() { return 'B.foo'; };
31 makeA = function(){return new A}; 30 makeA = function(){return new A};
32 makeB = function(){return new B}; 31 makeB = function(){return new B};
33 """; 32 """;
34 33
(...skipping 14 matching lines...) Expand all
49 Expect.isFalse(a is B); 48 Expect.isFalse(a is B);
50 Expect.isTrue(b is B); 49 Expect.isTrue(b is B);
51 Expect.isFalse(c is B); 50 Expect.isFalse(c is B);
52 51
53 Expect.isFalse(a is C); 52 Expect.isFalse(a is C);
54 Expect.isFalse(b is C); 53 Expect.isFalse(b is C);
55 Expect.isTrue(c is C); 54 Expect.isTrue(c is C);
56 55
57 Expect.equals('B.foo', b.foo()); 56 Expect.equals('B.foo', b.foo());
58 } 57 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698