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

Unified Diff: tests/corelib_2/int_parse_radix_bad_handler_test.dart

Issue 2997533002: Migrate test block 10 to Dart 2.0. (Closed)
Patch Set: Fix merge error Created 3 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
« no previous file with comments | « tests/corelib_2/errors_test.dart ('k') | tests/corelib_2/int_parse_radix_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_2/int_parse_radix_bad_handler_test.dart
diff --git a/tests/corelib_2/int_parse_radix_bad_handler_test.dart b/tests/corelib_2/int_parse_radix_bad_handler_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2c3b2be0d016e361ed167733144b17091ab89430
--- /dev/null
+++ b/tests/corelib_2/int_parse_radix_bad_handler_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// 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 "package:expect/expect.dart";
+
+void main() {
+ // These are compile time errors for Dart 2.0.
+ Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: "not a function"));
+ Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: () => 42));
+ Expect.throws(() => int.parse("9", radix: 8, /*@compile-error=unspecified*/ onError: (v1, v2) => 42));
+}
« no previous file with comments | « tests/corelib_2/errors_test.dart ('k') | tests/corelib_2/int_parse_radix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698