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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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
8 int test(int a, {int b: 2, int c: 3}) { 6 int test(int a, {int b: 2, int c: 3}) {
9 int result = 0; 7 int result = 0;
10 ?b; 8 ?b;
11 ?result; /// 01: compile-time error 9 ?result; /// 01: compile-time error
12 if (?a) { 10 if (?a) {
13 result += 100; 11 result += 100;
14 } 12 }
15 if (?b) { 13 if (?b) {
16 result += 20; 14 result += 20;
17 } 15 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 67
70 Expect.equals(100, closure_test(1)()); 68 Expect.equals(100, closure_test(1)());
71 Expect.equals(720, closure_test(1, b: 2)()); 69 Expect.equals(720, closure_test(1, b: 2)());
72 Expect.equals(523, closure_test(1, b: 2, c: 3)()); 70 Expect.equals(523, closure_test(1, b: 2, c: 3)());
73 Expect.equals(703, closure_test(1, c: 3)()); 71 Expect.equals(703, closure_test(1, c: 3)());
74 72
75 Expect.equals(true, tl_test(0)); 73 Expect.equals(true, tl_test(0));
76 Expect.equals(false, tl_test()); 74 Expect.equals(false, tl_test());
77 } 75 }
78 } 76 }
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