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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
7 // [function, [list of tuples argument/result]]. 9 // [function, [list of tuples argument/result]].
8 var expectedResults = 10 var expectedResults =
9 [ [divBy1, 11 [ [divBy1,
10 [[134217730, 134217730], 12 [[134217730, 134217730],
11 [-134217730, -134217730], 13 [-134217730, -134217730],
12 [10, 10], 14 [10, 10],
13 [-10, -10]]], 15 [-10, -10]]],
14 [divByNeg1, 16 [divByNeg1,
15 [[134217730, -134217730], 17 [[134217730, -134217730],
16 [-134217730, 134217730], 18 [-134217730, 134217730],
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 int res = v[1]; 96 int res = v[1];
95 Expect.equals(res, f(arg)); 97 Expect.equals(res, f(arg));
96 } 98 }
97 } 99 }
98 try { 100 try {
99 divBy0(4); 101 divBy0(4);
100 Expect.fail("Should have thrown exception."); 102 Expect.fail("Should have thrown exception.");
101 } on IntegerDivisionByZeroException catch (e) {} 103 } on IntegerDivisionByZeroException catch (e) {}
102 } 104 }
103 } 105 }
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