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

Unified Diff: test/codegen/lib/mirrors/type_variable_is_static_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/type_variable_is_static_test.dart
diff --git a/test/codegen/language/type_check_const_function_typedef_test.dart b/test/codegen/lib/mirrors/type_variable_is_static_test.dart
similarity index 52%
copy from test/codegen/language/type_check_const_function_typedef_test.dart
copy to test/codegen/lib/mirrors/type_variable_is_static_test.dart
index 484c61aeef1a2f3230d5e97c1e6af609b5bac1b0..ada920d4f1e30e7b2895fe8a5ac900c8470c1248 100644
--- a/test/codegen/language/type_check_const_function_typedef_test.dart
+++ b/test/codegen/lib/mirrors/type_variable_is_static_test.dart
@@ -2,21 +2,16 @@
// 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.
-// Tests that typechecks on const objects with typedefs work.
+library test.type_variable_owner;
-import "package:expect/expect.dart";
-
-typedef String Int2String(int x);
+import "dart:mirrors";
-class A {
- final Int2String f;
- const A(this.f);
-}
-
-String foo(int x) => "str";
+import "package:expect/expect.dart";
-const a = const A(foo);
+class C<T> {}
+typedef bool Predicate<T>(T t);
main() {
- Expect.equals("str", a.f(499));
+ Expect.isFalse(reflectType(C).typeVariables.single.isStatic);
+ Expect.isFalse(reflectType(Predicate).typeVariables.single.isStatic);
}
« no previous file with comments | « test/codegen/lib/mirrors/type_mirror_for_type_test.dart ('k') | test/codegen/lib/mirrors/type_variable_owner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698