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

Unified Diff: test/codegen/lib/mirrors/parameter_is_const_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/parameter_is_const_test.dart
diff --git a/test/codegen/lib/typed_data/setRange_1_test.dart b/test/codegen/lib/mirrors/parameter_is_const_test.dart
similarity index 53%
copy from test/codegen/lib/typed_data/setRange_1_test.dart
copy to test/codegen/lib/mirrors/parameter_is_const_test.dart
index f39515c2596b4160edee85dbf2ed798234522e1b..45185a9b88d15539aa12dbc1f65b2cc2269e7be3 100644
--- a/test/codegen/lib/typed_data/setRange_1_test.dart
+++ b/test/codegen/lib/mirrors/parameter_is_const_test.dart
@@ -2,15 +2,19 @@
// 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.
-import 'dart:typed_data';
+library test.parameter_is_const;
+
+import 'dart:mirrors';
+
import 'package:expect/expect.dart';
-import 'setRange_lib.dart';
-sameTypeTest() {
- checkSameSize(makeInt16List, makeInt16View, makeInt16View);
- checkSameSize(makeUint16List, makeUint16View, makeUint16View);
+class Class {
+ foo(
+ const /// 01: compile-time error
+ param) {}
}
main() {
- sameTypeTest();
+ MethodMirror mm = reflectClass(Class).declarations[#foo];
+ Expect.isFalse(mm.parameters.single.isConst);
}
« no previous file with comments | « test/codegen/lib/mirrors/parameter_annotation_mirror_test.dart ('k') | test/codegen/lib/mirrors/parameter_metadata_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698