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

Side by Side Diff: tests/language/optimized_constant_array_string_access_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
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
5 // Test optimized constant string and constant array access. 7 // Test optimized constant string and constant array access.
6 8
7 int testConstantStringAndIndexCodeUnitAt() { 9 int testConstantStringAndIndexCodeUnitAt() {
8 int test(b) { 10 int test(b) {
9 if (b) return "hest".codeUnitAt(400); 11 if (b) return "hest".codeUnitAt(400);
10 return "hest".codeUnitAt(2); 12 return "hest".codeUnitAt(2);
11 } 13 }
12 14
13 Expect.throws(() => test(true)); 15 Expect.throws(() => test(true));
14 for (int i = 0; i < 10000; i++) test(false); 16 for (int i = 0; i < 10000; i++) test(false);
(...skipping 25 matching lines...) Expand all
40 for (int i = 0; i < 10000; i++) { foo(1); } 42 for (int i = 0; i < 10000; i++) { foo(1); }
41 Expect.throws(() => foo(2)); 43 Expect.throws(() => foo(2));
42 } 44 }
43 45
44 46
45 main() { 47 main() {
46 testConstantStringAndIndexCodeUnitAt(); 48 testConstantStringAndIndexCodeUnitAt();
47 testConstantArrayAndIndexAt(); 49 testConstantArrayAndIndexAt();
48 testNonSmiIndex(); 50 testNonSmiIndex();
49 } 51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698