Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: test/codegen/lib/mirrors/library_imports_bad_metadata_test.dart

Issue 2265533002: Add mirrors tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/codegen/lib/mirrors/library_imports_bad_metadata_test.dart
diff --git a/test/codegen/language/enum_mirror_test.dart b/test/codegen/lib/mirrors/library_imports_bad_metadata_test.dart
similarity index 50%
copy from test/codegen/language/enum_mirror_test.dart
copy to test/codegen/lib/mirrors/library_imports_bad_metadata_test.dart
index e85f121a01980d01bcf1b4a23f7b8db85a95a903..51c756ee59ae646e28a4df9075d93fb7b314f7e4 100644
--- a/test/codegen/language/enum_mirror_test.dart
+++ b/test/codegen/lib/mirrors/library_imports_bad_metadata_test.dart
@@ -2,16 +2,17 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-enum
+library test.library_imports_bad_metadata;
+@undefined /// 01: compile-time error
import 'dart:mirrors';
-
import 'package:expect/expect.dart';
-enum Foo { BAR, BAZ }
-
main() {
- Expect.equals('Foo.BAR', Foo.BAR.toString());
- var name = reflect(Foo.BAR).invoke(#toString, []).reflectee;
- Expect.equals('Foo.BAR', name);
+ LibraryMirror thisLibrary =
+ currentMirrorSystem().findLibrary(#test.library_imports_bad_metadata);
+
+ thisLibrary.libraryDependencies.forEach((dep) {
+ Expect.listEquals([], dep.metadata);
+ });
}
« no previous file with comments | « test/codegen/lib/mirrors/library_imports_b.dart ('k') | test/codegen/lib/mirrors/library_imports_deferred_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698