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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
« no previous file with comments | « tests/language/argument_definition5_test.dart ('k') | tests/language/arithmetic2_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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // Dart test program for testing argument definition test. 4 // Dart test program for testing argument definition test.
5 5
6 import "package:expect/expect.dart";
7
6 int test(int a, {int b: 2, int c: 3}) { 8 int test(int a, {int b: 2, int c: 3}) {
7 int result = 0; 9 int result = 0;
8 ?b; 10 ?b;
9 ?result; /// 01: compile-time error 11 ?result; /// 01: compile-time error
10 if (?a) { 12 if (?a) {
11 result += 100; 13 result += 100;
12 } 14 }
13 if (?b) { 15 if (?b) {
14 result += 20; 16 result += 20;
15 } 17 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 69
68 Expect.equals(100, closure_test(1)()); 70 Expect.equals(100, closure_test(1)());
69 Expect.equals(720, closure_test(1, b: 2)()); 71 Expect.equals(720, closure_test(1, b: 2)());
70 Expect.equals(523, closure_test(1, b: 2, c: 3)()); 72 Expect.equals(523, closure_test(1, b: 2, c: 3)());
71 Expect.equals(703, closure_test(1, c: 3)()); 73 Expect.equals(703, closure_test(1, c: 3)());
72 74
73 Expect.equals(true, tl_test(0)); 75 Expect.equals(true, tl_test(0));
74 Expect.equals(false, tl_test()); 76 Expect.equals(false, tl_test());
75 } 77 }
76 } 78 }
OLDNEW
« no previous file with comments | « tests/language/argument_definition5_test.dart ('k') | tests/language/arithmetic2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698