| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 | 5 |
| 6 library Prefix11Test.dart; | 6 library Prefix11Test.dart; |
| 7 |
| 7 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
| 8 import "library10.dart"; | 9 import "library10.dart"; |
| 9 import "library11.dart" as lib11; | 10 import "library11.dart" as lib11; |
| 10 | 11 |
| 11 class Prefix11Test { | 12 class Prefix11Test { |
| 12 static Test1() { | 13 static Test1() { |
| 13 var result = 0; | 14 var result = 0; |
| 14 var obj = new Library10(1); | 15 var obj = new Library10(1); |
| 15 result = obj.fld; | 16 result = obj.fld; |
| 16 Expect.equals(1, result); | 17 Expect.equals(1, result); |
| 17 result += obj.func(); | 18 result += obj.func(); |
| 18 Expect.equals(3, result); | 19 Expect.equals(3, result); |
| 19 result += Library10.static_func(); | 20 result += Library10.static_func(); |
| 20 Expect.equals(6, result); | 21 Expect.equals(6, result); |
| 21 result += Library10.static_fld; | 22 result += Library10.static_fld; |
| 22 Expect.equals(10, result); | 23 Expect.equals(10, result); |
| 23 } | 24 } |
| 25 |
| 24 static Test2() { | 26 static Test2() { |
| 25 var result = 0; | 27 var result = 0; |
| 26 var obj = new lib11.Library11(4); | 28 var obj = new lib11.Library11(4); |
| 27 result = obj.fld; | 29 result = obj.fld; |
| 28 Expect.equals(4, result); | 30 Expect.equals(4, result); |
| 29 result += obj.func(); | 31 result += obj.func(); |
| 30 Expect.equals(7, result); | 32 Expect.equals(7, result); |
| 31 result += lib11.Library11.static_func(); | 33 result += lib11.Library11.static_func(); |
| 32 Expect.equals(9, result); | 34 Expect.equals(9, result); |
| 33 result += lib11.Library11.static_fld; | 35 result += lib11.Library11.static_fld; |
| 34 Expect.equals(10, result); | 36 Expect.equals(10, result); |
| 35 } | 37 } |
| 38 |
| 36 static Test3() { | 39 static Test3() { |
| 37 Expect.equals(10, top_level10); | 40 Expect.equals(10, top_level10); |
| 38 Expect.equals(20, top_level_func10()); | 41 Expect.equals(20, top_level_func10()); |
| 39 } | 42 } |
| 43 |
| 40 static Test4() { | 44 static Test4() { |
| 41 Expect.equals(100, lib11.top_level11); | 45 Expect.equals(100, lib11.top_level11); |
| 42 Expect.equals(200, lib11.top_level_func11()); | 46 Expect.equals(200, lib11.top_level_func11()); |
| 43 } | 47 } |
| 44 } | 48 } |
| 45 | 49 |
| 46 main() { | 50 main() { |
| 47 Prefix11Test.Test1(); | 51 Prefix11Test.Test1(); |
| 48 Prefix11Test.Test2(); | 52 Prefix11Test.Test2(); |
| 49 Prefix11Test.Test3(); | 53 Prefix11Test.Test3(); |
| 50 Prefix11Test.Test4(); | 54 Prefix11Test.Test4(); |
| 51 } | 55 } |
| OLD | NEW |