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

Side by Side Diff: test/cctest/test-strings.cc

Issue 11759008: Introduce ENABLE_LATIN_1 compile flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix FilterASCII Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/regress/regress-latin-1.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 2
3 // Check that we can traverse very deep stacks of ConsStrings using 3 // Check that we can traverse very deep stacks of ConsStrings using
4 // StringCharacterStram. Check that Get(int) works on very deep stacks 4 // StringCharacterStram. Check that Get(int) works on very deep stacks
5 // of ConsStrings. These operations may not be very fast, but they 5 // of ConsStrings. These operations may not be very fast, but they
6 // should be possible without getting errors due to too deep recursion. 6 // should be possible without getting errors due to too deep recursion.
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 9
10 #include "v8.h" 10 #include "v8.h"
(...skipping 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 Handle<String> string = v8::Utils::OpenHandle(v8::String::Cast(*result)); 1266 Handle<String> string = v8::Utils::OpenHandle(v8::String::Cast(*result));
1267 CHECK(string->IsSeqTwoByteString()); 1267 CHECK(string->IsSeqTwoByteString());
1268 1268
1269 v8::Local<v8::String> expected = v8_str("ascii\x80only\x80string\x80"); 1269 v8::Local<v8::String> expected = v8_str("ascii\x80only\x80string\x80");
1270 CHECK(expected->Equals(result)); 1270 CHECK(expected->Equals(result));
1271 } 1271 }
1272 1272
1273 1273
1274 TEST(IsAscii) { 1274 TEST(IsAscii) {
1275 CHECK(String::IsAscii(static_cast<char*>(NULL), 0)); 1275 CHECK(String::IsAscii(static_cast<char*>(NULL), 0));
1276 CHECK(String::IsAscii(static_cast<uc16*>(NULL), 0)); 1276 CHECK(String::IsOneByte(static_cast<uc16*>(NULL), 0));
1277 } 1277 }
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | test/mjsunit/regress/regress-latin-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698