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

Side by Side Diff: tests/compiler/dart2js_native/runtimetype_test.dart

Issue 2841543002: Spelling a (Closed)
Patch Set: Created 3 years, 7 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 'native_testing.dart'; 5 import 'native_testing.dart';
6 6
7 // Test to see runtimeType works on native classes and does not use the native 7 // Test to see runtimeType works on native classes and does not use the native
8 // constructor name. 8 // constructor name.
9 9
10 @Native("TAGX") 10 @Native("TAGX")
11 class A {} 11 class A {}
12 12
13 @Native("TAGY") 13 @Native("TAGY")
14 class B extends A {} 14 class B extends A {}
15 15
16 makeA() native; 16 makeA() native;
17 makeB() native; 17 makeB() native;
18 18
19 void setup() native """ 19 void setup() native """
20 // This code is all inside 'setup' and so not accesible from the global scope. 20 // This code is all inside 'setup' and so not accessible from the global scope.
21 function inherits(child, parent) { 21 function inherits(child, parent) {
22 function tmp() {}; 22 function tmp() {};
23 tmp.prototype = parent.prototype; 23 tmp.prototype = parent.prototype;
24 child.prototype = new tmp(); 24 child.prototype = new tmp();
25 child.prototype.constructor = child; 25 child.prototype.constructor = child;
26 } 26 }
27 27
28 function TAGX(){} 28 function TAGX(){}
29 function TAGY(){} 29 function TAGY(){}
30 inherits(TAGY, TAGX); 30 inherits(TAGY, TAGX);
(...skipping 27 matching lines...) Expand all
58 Expect.notEquals('TAGY', '$bT'); 58 Expect.notEquals('TAGY', '$bT');
59 } 59 }
60 60
61 main() { 61 main() {
62 nativeTesting(); 62 nativeTesting();
63 setup(); 63 setup();
64 64
65 testDynamicContext(); 65 testDynamicContext();
66 testStaticContext(); 66 testStaticContext();
67 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698