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

Side by Side Diff: tests/language/div_with_power_of_two_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/div_by_zero_test.dart ('k') | tests/language/do_while2_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 division by power of two. 4 // Test division by power of two.
5 // Test that results before and after optimization are the same. 5 // Test that results before and after optimization are the same.
6 6
7 import "package:expect/expect.dart";
8
9 // [function, [list of tuples argument/result]]. 7 // [function, [list of tuples argument/result]].
10 var expectedResults = 8 var expectedResults =
11 [ [divBy1, 9 [ [divBy1,
12 [[134217730, 134217730], 10 [[134217730, 134217730],
13 [-134217730, -134217730], 11 [-134217730, -134217730],
14 [10, 10], 12 [10, 10],
15 [-10, -10]]], 13 [-10, -10]]],
16 [divByNeg1, 14 [divByNeg1,
17 [[134217730, -134217730], 15 [[134217730, -134217730],
18 [-134217730, 134217730], 16 [-134217730, 134217730],
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 int res = v[1]; 94 int res = v[1];
97 Expect.equals(res, f(arg)); 95 Expect.equals(res, f(arg));
98 } 96 }
99 } 97 }
100 try { 98 try {
101 divBy0(4); 99 divBy0(4);
102 Expect.fail("Should have thrown exception."); 100 Expect.fail("Should have thrown exception.");
103 } on IntegerDivisionByZeroException catch (e) {} 101 } on IntegerDivisionByZeroException catch (e) {}
104 } 102 }
105 } 103 }
OLDNEW
« no previous file with comments | « tests/language/div_by_zero_test.dart ('k') | tests/language/do_while2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698