| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |