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

Side by Side Diff: tests/language/load_to_load_forwarding_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/liveness_test.dart ('k') | tests/language/local_export_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 // Test correctness of side effects tracking used by load to load forwarding. 4 // Test correctness of side effects tracking used by load to load forwarding.
5 5
6 import "package:expect/expect.dart";
7
8 class A { 6 class A {
9 var x, y; 7 var x, y;
10 A(this.x, this.y); 8 A(this.x, this.y);
11 } 9 }
12 10
13 foo(a) { 11 foo(a) {
14 var value1 = a.x; 12 var value1 = a.x;
15 var value2 = a.y; 13 var value2 = a.y;
16 for (var j = 1; j < 4; j++) { 14 for (var j = 1; j < 4; j++) {
17 value1 |= a.x << (j * 8); 15 value1 |= a.x << (j * 8);
(...skipping 17 matching lines...) Expand all
35 return [value1, value2]; 33 return [value1, value2];
36 } 34 }
37 35
38 main() { 36 main() {
39 for (var i = 0; i < 2000; i++) { 37 for (var i = 0; i < 2000; i++) {
40 Expect.listEquals([0x02010000, 0x03020100], foo(new A(0, 0))); 38 Expect.listEquals([0x02010000, 0x03020100], foo(new A(0, 0)));
41 Expect.listEquals([0x02010000, 0x03020100], bar(new A(0, 0), false)); 39 Expect.listEquals([0x02010000, 0x03020100], bar(new A(0, 0), false));
42 Expect.listEquals([0x04020000, 0x03020100], bar(new A(0, 0), true)); 40 Expect.listEquals([0x04020000, 0x03020100], bar(new A(0, 0), true));
43 } 41 }
44 } 42 }
OLDNEW
« no previous file with comments | « tests/language/liveness_test.dart ('k') | tests/language/local_export_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698