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

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