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

Side by Side Diff: tests/language/optimized_string_charat_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 [] on strings. 7 // Test optimized [] on strings.
6 8
7 var a = "abc"; 9 var a = "abc";
8 var b = "øbc"; 10 var b = "øbc";
9 var c = new String.fromCharCodes([123, 456, 789]); 11 var c = new String.fromCharCodes([123, 456, 789]);
10 12
11 test_charat(s, i) { 13 test_charat(s, i) {
12 return s[i]; 14 return s[i];
13 } 15 }
14 16
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 58
57 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); 59 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
58 for (var i=0; i<10000; i++) test_charat(c, 0); 60 for (var i=0; i<10000; i++) test_charat(c, 0);
59 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0)); 61 Expect.equals(new String.fromCharCodes([123]), test_charat(c, 0));
60 Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1)); 62 Expect.equals(new String.fromCharCodes([456]), test_charat(c, 1));
61 Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2)); 63 Expect.equals(new String.fromCharCodes([789]), test_charat(c, 2));
62 Expect.throws(() => test_charat(c, 3)); 64 Expect.throws(() => test_charat(c, 3));
63 65
64 66
65 } 67 }
OLDNEW
« no previous file with comments | « tests/language/optimized_setter_test.dart ('k') | tests/language/optimized_string_charcodeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698