| 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 // Dart test for testing access to private fields. | 5 // Dart test for testing access to private fields. |
| 6 | 6 |
| 7 main() { | 7 main() { |
| 8 testPrivateTopLevel(); | 8 testPrivateTopLevel(); |
| 9 testPrivateClasses(); | 9 testPrivateClasses(); |
| 10 } | 10 } |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 var a2 = new AImported(); | 71 var a2 = new AImported(); |
| 72 Expect.equals(499, a2.getFieldA()); | 72 Expect.equals(499, a2.getFieldA()); |
| 73 | 73 |
| 74 B b = new B(); | 74 B b = new B(); |
| 75 Expect.equals(42, b._fieldB); | 75 Expect.equals(42, b._fieldB); |
| 76 Expect.equals(42, accessFieldB2(b)); | 76 Expect.equals(42, accessFieldB2(b)); |
| 77 expectCatch(() => LibOther3.accessFieldB3(b)); | 77 expectCatch(() => LibOther3.accessFieldB3(b)); |
| 78 | 78 |
| 79 C4 c = new C4(); | 79 C4 c = new C4(); |
| 80 Expect.equals(499, c._field1); |
| 80 Expect.equals(499, c_field1a(c)); | 81 Expect.equals(499, c_field1a(c)); |
| 81 Expect.equals(499, c.field1a()); | 82 Expect.equals(499, c.field1a()); |
| 83 Expect.equals(42, c._field2); |
| 82 Expect.equals(42, c_field2a(c)); | 84 Expect.equals(42, c_field2a(c)); |
| 83 Expect.equals(42, c.field2a()); | 85 Expect.equals(42, c.field2a()); |
| 84 Expect.equals(99, LibOther3.c_field1b(c)); | 86 Expect.equals(99, LibOther3.c_field1b(c)); |
| 85 Expect.equals(99, c.field1b()); | 87 Expect.equals(99, c.field1b()); |
| 86 Expect.equals(1024, LibOther3.c_field2b(c)); | 88 Expect.equals(1024, LibOther3.c_field2b(c)); |
| 87 Expect.equals(1024, c.field2b()); | 89 Expect.equals(1024, c.field2b()); |
| 88 Expect.equals(499, c.field1c()); | 90 Expect.equals(499, c.field1c()); |
| 89 Expect.equals(99, c.field1d()); | 91 Expect.equals(99, c.field1d()); |
| 90 } | 92 } |
| OLD | NEW |