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

Unified Diff: tests/language/optimized_string_charcodeat_test.dart

Issue 132553002: Fix test to use real two byte strings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/optimized_string_charcodeat_test.dart
===================================================================
--- tests/language/optimized_string_charcodeat_test.dart (revision 31674)
+++ tests/language/optimized_string_charcodeat_test.dart (working copy)
@@ -9,7 +9,7 @@
String one_byte = "hest";
-String two_byte = "høns";
+String two_byte = "h\u{2029}ns";
int testOneByteCodeUnitAt(String x, int j) {
int test() {
@@ -68,13 +68,13 @@
main() {
for (int j = 0; j < 10; j++) {
Expect.equals(101, testOneByteCodeUnitAt(one_byte, 1));
- Expect.equals(248, testTwoByteCodeUnitAt(two_byte, 1));
+ Expect.equals(8233, testTwoByteCodeUnitAt(two_byte, 1));
Expect.equals(248, testConstantStringCodeUnitAt(1));
Expect.equals(101, testConstantIndexCodeUnitAt(one_byte));
}
for (int j = 0; j < 20; j++) {
Expect.equals(436, testOneByteCodeUnitAtInLoop(one_byte));
- Expect.equals(577, testTwoByteCodeUnitAtInLoop(two_byte));
+ Expect.equals(8562, testTwoByteCodeUnitAtInLoop(two_byte));
}
Expect.throws(() => testOneByteCodeUnitAtInLoop(123));
Expect.throws(() => testTwoByteCodeUnitAtInLoop(123));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698