| 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 class LibraryPrefixes { | |
| 6 | |
| 7 static void main(var expectEquals) { | |
| 8 var a = Constants.PI; | |
| 9 var b = other.Constants.PI; | |
| 10 expectEquals(3.14, a); | |
| 11 expectEquals(3.14, b); | |
| 12 | |
| 13 expectEquals(1, Constants.foo); | |
| 14 expectEquals(2, other.Constants.foo); | |
| 15 | |
| 16 expectEquals(-1, A.y); | |
| 17 expectEquals(0, other.A.y); | |
| 18 | |
| 19 expectEquals(1, new A().x); | |
| 20 expectEquals(2, new other.A().x); | |
| 21 | |
| 22 expectEquals(3, new A.named().x); | |
| 23 expectEquals(4, new other.A.named().x); | |
| 24 | |
| 25 expectEquals(3, new A.fac().x); | |
| 26 expectEquals(4, new other.A.fac().x); | |
| 27 | |
| 28 expectEquals(1, new B().x); | |
| 29 expectEquals(2, new other.B().x); | |
| 30 | |
| 31 expectEquals(8, new B.named().x); | |
| 32 expectEquals(13, new other.B.named().x); | |
| 33 | |
| 34 expectEquals(8, new B.fac().x); | |
| 35 expectEquals(13, new other.B.fac().x); | |
| 36 | |
| 37 expectEquals(1, const C().x); | |
| 38 expectEquals(2, const other.C().x); | |
| 39 | |
| 40 expectEquals(3, const C.named().x); | |
| 41 expectEquals(4, const other.C.named().x); | |
| 42 | |
| 43 expectEquals(3, new C.fac().x); | |
| 44 expectEquals(4, new other.C.fac().x); | |
| 45 | |
| 46 expectEquals(1, const D().x); | |
| 47 expectEquals(2, const other.D().x); | |
| 48 | |
| 49 expectEquals(8, const D.named().x); | |
| 50 expectEquals(13, const other.D.named().x); | |
| 51 | |
| 52 expectEquals(8, new D.fac().x); | |
| 53 expectEquals(13, new other.D.fac().x); | |
| 54 | |
| 55 expectEquals(0, E.foo()); | |
| 56 expectEquals(3, other.E.foo()); | |
| 57 | |
| 58 expectEquals(1, new E().bar()); | |
| 59 expectEquals(4, new other.E().bar()); | |
| 60 | |
| 61 expectEquals(9, new E().toto(7)()); | |
| 62 expectEquals(16, new other.E().toto(11)()); | |
| 63 | |
| 64 expectEquals(111, (new E.fun(100).f)()); | |
| 65 expectEquals(1313, (new other.E.fun(1300).f)()); | |
| 66 | |
| 67 expectEquals(999, E.fooo(900)()); | |
| 68 expectEquals(2048, other.E.fooo(1024)()); | |
| 69 } | |
| 70 } | |
| OLD | NEW |