| 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 // TODO(rmacnak): Move the existing mirror tests here (a place for | 5 // TODO(rmacnak): Move the existing mirror tests here (a place for |
| 6 // cross-implementation tests). | 6 // cross-implementation tests). |
| 7 | 7 |
| 8 library MirrorsTest; | 8 library MirrorsTest; |
| 9 import "dart:mirrors"; | 9 import "dart:mirrors"; |
| 10 import "../../../pkg/unittest/lib/unittest.dart"; | 10 import "../../../pkg/unittest/lib/unittest.dart"; |
| 11 import 'dart:uri'; | |
| 12 | 11 |
| 13 var topLevelField; | 12 var topLevelField; |
| 14 | 13 |
| 15 class Class<T> { | 14 class Class<T> { |
| 16 Class() { this.field = "default value"; } | 15 Class() { this.field = "default value"; } |
| 17 Class.withInitialValue(this.field); | 16 Class.withInitialValue(this.field); |
| 18 var field; | 17 var field; |
| 19 static var staticField; | 18 static var staticField; |
| 20 m(a, b, c) => {"a": a, "b": b, "c": c}; | 19 m(a, b, c) => {"a": a, "b": b, "c": c}; |
| 21 } | 20 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 testLibraryUri("test", (Uri uri) => uri == Uri.parse('dart:core')); | 216 testLibraryUri("test", (Uri uri) => uri == Uri.parse('dart:core')); |
| 218 }); | 217 }); |
| 219 test("Test simple and qualifiedName", () { testNames(mirrors, isDart2js); }); | 218 test("Test simple and qualifiedName", () { testNames(mirrors, isDart2js); }); |
| 220 if (isDart2js) return; // TODO(ahe): Remove this line. | 219 if (isDart2js) return; // TODO(ahe): Remove this line. |
| 221 test("Test reflect type", () { testReflectClass(mirrors); }); | 220 test("Test reflect type", () { testReflectClass(mirrors); }); |
| 222 } | 221 } |
| 223 | 222 |
| 224 main() { | 223 main() { |
| 225 mainWithArgument(isDart2js: false); | 224 mainWithArgument(isDart2js: false); |
| 226 } | 225 } |
| OLD | NEW |