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

Side by Side Diff: tests/language/field_optimization_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/field_optimization3_test.dart ('k') | tests/language/field_override2_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 4
5 import "package:expect/expect.dart";
6
7 // Dart test program to test type-based optimization on fields. 5 // Dart test program to test type-based optimization on fields.
8 6
9 7
10 class A { 8 class A {
11 var x; 9 var x;
12 A() : x = 0; 10 A() : x = 0;
13 foo() { 11 foo() {
14 x++; 12 x++;
15 } 13 }
16 toto() { 14 toto() {
17 x = 99; 15 x = 99;
18 } 16 }
19 bar(y) { 17 bar(y) {
20 x = y; 18 x = y;
21 } 19 }
22 } 20 }
23 21
24 class B { 22 class B {
25 operator +(other) => "ok"; 23 operator +(other) => "ok";
26 } 24 }
27 main() { 25 main() {
28 var a = new A(); 26 var a = new A();
29 a.foo(); 27 a.foo();
30 a.toto(); 28 a.toto();
31 a.bar("str"); 29 a.bar("str");
32 a.bar(new B()); 30 a.bar(new B());
33 a.foo(); 31 a.foo();
34 Expect.equals("ok", a.x); 32 Expect.equals("ok", a.x);
35 } 33 }
OLDNEW
« no previous file with comments | « tests/language/field_optimization3_test.dart ('k') | tests/language/field_override2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698