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

Side by Side Diff: tests/language/argument_definition5_test.dart

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013, 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 var x = "";
8
9 test(String str, [onError(String)]) {
10 return (() {
11 try {
12 throw "";
13 } catch(e) {
14 if (?onError) {
15 onError(str);
16 } else {
17 x = "${str} error";
18 }
19 }
20 });
21 }
22
23 ignoreError(String str) {
24 x = "${str} error ignored";
25 }
26
27 main() {
28 Expect.equals("", x);
29 test("test")();
30 Expect.equals("test error", x);
31 test("test", ignoreError)();
32 Expect.equals("test error ignored", x);
33 }
OLDNEW
« no previous file with comments | « tests/language/argument_definition4_test.dart ('k') | tests/language/argument_definition6_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698