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

Side by Side Diff: tests/language/constructor_body_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/constructor8_test.dart ('k') | tests/language/constructor_default_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 constructors without function bodies. 4 // Dart test program for constructors without function bodies.
5 5
6 import "package:expect/expect.dart";
7
8 // Test a non-const constructor works without a body. 6 // Test a non-const constructor works without a body.
9 class First { 7 class First {
10 First(int this.value); 8 First(int this.value);
11 First.named(int this.value); 9 First.named(int this.value);
12 int value; 10 int value;
13 } 11 }
14 12
15 // Test a const constructor works without a body. 13 // Test a const constructor works without a body.
16 class Second { 14 class Second {
17 const Second(int this.value); 15 const Second(int this.value);
18 const Second.named(int this.value); 16 const Second.named(int this.value);
19 final int value; 17 final int value;
20 } 18 }
21 19
22 class ConstructorBodyTest { 20 class ConstructorBodyTest {
23 static testMain() { 21 static testMain() {
24 Expect.equals(4, new First(4).value); 22 Expect.equals(4, new First(4).value);
25 Expect.equals(5, new First.named(5).value); 23 Expect.equals(5, new First.named(5).value);
26 Expect.equals(6, new Second(6).value); 24 Expect.equals(6, new Second(6).value);
27 Expect.equals(7, new Second.named(7).value); 25 Expect.equals(7, new Second.named(7).value);
28 } 26 }
29 } 27 }
30 28
31 main() { 29 main() {
32 ConstructorBodyTest.testMain(); 30 ConstructorBodyTest.testMain();
33 } 31 }
OLDNEW
« no previous file with comments | « tests/language/constructor8_test.dart ('k') | tests/language/constructor_default_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698