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 // Test to check if we are able to import multiple libraries using the | 5 // Test to check if we are able to import multiple libraries using the |
6 // same prefix. | 6 // same prefix. |
7 | 7 |
8 library Prefix101Test.dart; | 8 library Prefix101Test.dart; |
9 | 9 |
| 10 import "package:expect/expect.dart"; |
10 import "library10.dart" as lib101; | 11 import "library10.dart" as lib101; |
11 import "library11.dart" as lib101; | 12 import "library11.dart" as lib101; |
12 | 13 |
13 class Prefix101Test { | 14 class Prefix101Test { |
14 static Test1() { | 15 static Test1() { |
15 var result = 0; | 16 var result = 0; |
16 var obj = new lib101.Library10(1); | 17 var obj = new lib101.Library10(1); |
17 result = obj.fld; | 18 result = obj.fld; |
18 Expect.equals(1, result); | 19 Expect.equals(1, result); |
19 result += obj.func(); | 20 result += obj.func(); |
(...skipping 24 matching lines...) Expand all Loading... |
44 Expect.equals(200, lib101.top_level_func11()); | 45 Expect.equals(200, lib101.top_level_func11()); |
45 } | 46 } |
46 } | 47 } |
47 | 48 |
48 main() { | 49 main() { |
49 Prefix101Test.Test1(); | 50 Prefix101Test.Test1(); |
50 Prefix101Test.Test2(); | 51 Prefix101Test.Test2(); |
51 Prefix101Test.Test3(); | 52 Prefix101Test.Test3(); |
52 Prefix101Test.Test4(); | 53 Prefix101Test.Test4(); |
53 } | 54 } |
OLD | NEW |