OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // TODO(ahe): This is a copy of | 5 // TODO(ahe): This is a copy of |
6 // ../../../../tests/language/src/NamingTest.dart and should be | 6 // ../../../../tests/language/src/NamingTest.dart and should be |
7 // deleted when the one TODO below is addressed. | 7 // deleted when the one TODO below is addressed. |
8 | 8 |
9 class A { | 9 class A { |
10 A() { NamingTest.count++; } | 10 A() { NamingTest.count++; } |
11 foo(a, b) { | 11 foo(a, b) { |
12 Expect.equals(1, a); | 12 Expect.equals(1, a); |
13 Expect.equals(2, b); | 13 Expect.equals(2, b); |
14 } | 14 } |
15 } | 15 } |
16 | 16 |
17 class MyException { | 17 class MyException { |
18 MyException() {} | 18 MyException() {} |
19 } | 19 } |
20 | 20 |
21 class debugger { | 21 class debugger { |
22 static final int __PROTO__ = 5; | 22 static const int __PROTO__ = 5; |
23 | 23 |
24 int x; | 24 int x; |
25 | 25 |
26 factory debugger.F() { | 26 factory debugger.F() { |
27 return new debugger(1); | 27 return new debugger(1); |
28 } | 28 } |
29 debugger(x) : this.x = x + 1 { } | 29 debugger(x) : this.x = x + 1 { } |
30 debugger.C(x) : this.x = x + 2 { } | 30 debugger.C(x) : this.x = x + 2 { } |
31 debugger.C$C(x) : this.x = x + 3 { } | 31 debugger.C$C(x) : this.x = x + 3 { } |
32 debugger.C$I(x) : this.x = x + 4 { } | 32 debugger.C$I(x) : this.x = x + 4 { } |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 var a = new Naming2Test(); | 517 var a = new Naming2Test(); |
518 Expect.throws(() => a.foo(2), (e) => e is ObjectNotClosureException); | 518 Expect.throws(() => a.foo(2), (e) => e is ObjectNotClosureException); |
519 } | 519 } |
520 } | 520 } |
521 | 521 |
522 main() { | 522 main() { |
523 NamingTest.testMain(); | 523 NamingTest.testMain(); |
524 Naming1Test.main(null); | 524 Naming1Test.main(null); |
525 Naming2Test.main(null); | 525 Naming2Test.main(null); |
526 } | 526 } |
OLD | NEW |