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

Unified Diff: test/codegen/corelib/list_filled_type_argument_test.dart

Issue 1945153002: Add corelib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: error_test and range_error_test now pass Created 4 years, 7 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
« no previous file with comments | « test/codegen/corelib/list_fill_range_test.dart ('k') | test/codegen/corelib/list_first_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/corelib/list_filled_type_argument_test.dart
diff --git a/test/codegen/language/call_argument_inference_test.dart b/test/codegen/corelib/list_filled_type_argument_test.dart
similarity index 53%
copy from test/codegen/language/call_argument_inference_test.dart
copy to test/codegen/corelib/list_filled_type_argument_test.dart
index 0af5537d58ddb8eacad9f37bbbb5e0adc8295f3c..1c3aff49e8db2ebe7e8286ed9f5cfe4670fddbda 100644
--- a/test/codegen/language/call_argument_inference_test.dart
+++ b/test/codegen/corelib/list_filled_type_argument_test.dart
@@ -4,11 +4,12 @@
import "package:expect/expect.dart";
-class A {
- call(a) => a is num;
-}
-
main() {
- Expect.isTrue(new A().call(42));
- Expect.isFalse(new A()('foo'));
+ var a = new List<int>.filled(42, 42);
+ Expect.isTrue(a is List<int>);
+ Expect.isFalse(a is List<String>);
+
+ a = new List<int>.filled(42, 42, growable: true);
+ Expect.isTrue(a is List<int>);
+ Expect.isFalse(a is List<String>);
}
« no previous file with comments | « test/codegen/corelib/list_fill_range_test.dart ('k') | test/codegen/corelib/list_first_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698