Commit 37c3e05e authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[test] Update MakeExternal tests

They weren't initializing the VM at the start of the test. Also updated
the test description.

Bug: v8:7790
Change-Id: I7b9df9e3aebb43fc526e16ec260aa071c0fdeb92
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2615019
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71978}
parent cf49d0d8
...@@ -1948,9 +1948,10 @@ TEST(Regress876759) { ...@@ -1948,9 +1948,10 @@ TEST(Regress876759) {
CHECK(String::IsOneByteRepresentationUnderneath(*sliced)); CHECK(String::IsOneByteRepresentationUnderneath(*sliced));
} }
// Show failure when trying to create and internal, external and uncached string // Show that small internal strings are not externalizable since it would make
// through MakeExternal. One byte version. // them external and uncached through MakeExternal. One byte version.
TEST(MakeExternalCreationFailureOneByte) { TEST(MakeExternalCreationFailureOneByte) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory(); Factory* factory = isolate->factory();
// Due to different size restrictions the string needs to be small but not too // Due to different size restrictions the string needs to be small but not too
...@@ -1971,9 +1972,10 @@ TEST(MakeExternalCreationFailureOneByte) { ...@@ -1971,9 +1972,10 @@ TEST(MakeExternalCreationFailureOneByte) {
CHECK(!one_byte_string->SupportsExternalization()); CHECK(!one_byte_string->SupportsExternalization());
} }
// Show failure when trying to create and internal, external and uncached string // Show that small internal strings are not externalizable since it would make
// through MakeExternal. Two byte version. // them external and uncached through MakeExternal. Two byte version.
TEST(MakeExternalCreationFailureTwoByte) { TEST(MakeExternalCreationFailureTwoByte) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate(); Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory(); Factory* factory = isolate->factory();
// Due to different size restrictions the string needs to be small but not too // Due to different size restrictions the string needs to be small but not too
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment