OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 // | |
5 | |
6 #library("Prefix11Test.dart"); | |
7 #import("library10.dart"); | |
8 #import("library11.dart", prefix : "lib11"); | |
9 | |
10 class Prefix11Test { | |
11 static Test1() { | |
12 var result = 0; | |
13 var obj = new Library10(1); | |
14 result = obj.fld; | |
15 Expect.equals(1, result); | |
16 result += obj.func(); | |
17 Expect.equals(3, result); | |
18 result += Library10.static_func(); | |
19 Expect.equals(6, result); | |
20 result += Library10.static_fld; | |
21 Expect.equals(10, result); | |
22 } | |
23 static Test2() { | |
24 var result = 0; | |
25 var obj = new lib11.Library11(4); | |
26 result = obj.fld; | |
27 Expect.equals(4, result); | |
28 result += obj.func(); | |
29 Expect.equals(7, result); | |
30 result += lib11.Library11.static_func(); | |
31 Expect.equals(9, result); | |
32 result += lib11.Library11.static_fld; | |
33 Expect.equals(10, result); | |
34 } | |
35 static Test3() { | |
36 Expect.equals(10, top_level10); | |
37 Expect.equals(20, top_level_func10()); | |
38 } | |
39 static Test4() { | |
40 Expect.equals(100, lib11.top_level11); | |
41 Expect.equals(200, lib11.top_level_func11()); | |
42 } | |
43 } | |
44 | |
45 main() { | |
46 Prefix11Test.Test1(); | |
47 Prefix11Test.Test2(); | |
48 Prefix11Test.Test3(); | |
49 Prefix11Test.Test4(); | |
50 } | |
OLD | NEW |