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