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

Side by Side Diff: tests/corelib/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 unified diff | Download patch
« no previous file with comments | « tests/corelib/corelib.status ('k') | tests/corelib/int_parse_radix_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 void main() {
8 // If handleError isn't an unary function, and it's called, it also throws
9 // (either TypeError in checked mode, or some failure in unchecked mode).
10
11 // These are compile time errors for strong mode.
12 Expect.throws(() => int.parse("9", radix: 8, onError: "not a function"));
13 Expect.throws(() => int.parse("9", radix: 8, onError: () => 42));
14 Expect.throws(() => int.parse("9", radix: 8, onError: (v1, v2) => 42));
15 }
OLDNEW
« no previous file with comments | « tests/corelib/corelib.status ('k') | tests/corelib/int_parse_radix_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698