Index: test/cctest/test-api.cc |
=================================================================== |
--- test/cctest/test-api.cc (revision 11074) |
+++ test/cctest/test-api.cc (working copy) |
@@ -5770,6 +5770,8 @@ |
Local<v8::String>::Cast(a->Get(i)); |
Local<v8::Number> expected_len = |
Local<v8::Number>::Cast(alens->Get(i)); |
+ CHECK_EQ((expected_len->Value() != string->Length()), |
+ string->MayContainNonAscii()); |
fschneider
2012/03/19 08:46:31
Fix indentation here.
Erik Corry
2012/03/19 09:51:02
Done.
|
int length = GetUtf8Length(string); |
CHECK_EQ(static_cast<int>(expected_len->Value()), length); |
} |
@@ -11927,6 +11929,9 @@ |
"var slice = lhs.substring(1, lhs.length - 1);" |
"var slice_on_cons = (lhs + rhs).substring(1, lhs.length *2 - 1);"); |
+ CHECK(!lhs->MayContainNonAscii()); |
+ CHECK(!rhs->MayContainNonAscii()); |
+ |
MorphAString(*v8::Utils::OpenHandle(*lhs), &ascii_resource, &uc16_resource); |
MorphAString(*v8::Utils::OpenHandle(*rhs), &ascii_resource, &uc16_resource); |