[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: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71978}
This commit is contained in:
Santiago Aboy Solanes 2021-01-07 17:16:54 +00:00 committed by Commit Bot
parent cf49d0d84c
commit 37c3e05e81

View File

@ -1948,9 +1948,10 @@ TEST(Regress876759) {
CHECK(String::IsOneByteRepresentationUnderneath(*sliced));
}
// Show failure when trying to create and internal, external and uncached string
// through MakeExternal. One byte version.
// Show that small internal strings are not externalizable since it would make
// them external and uncached through MakeExternal. One byte version.
TEST(MakeExternalCreationFailureOneByte) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
// Due to different size restrictions the string needs to be small but not too
@ -1971,9 +1972,10 @@ TEST(MakeExternalCreationFailureOneByte) {
CHECK(!one_byte_string->SupportsExternalization());
}
// Show failure when trying to create and internal, external and uncached string
// through MakeExternal. Two byte version.
// Show that small internal strings are not externalizable since it would make
// them external and uncached through MakeExternal. Two byte version.
TEST(MakeExternalCreationFailureTwoByte) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
// Due to different size restrictions the string needs to be small but not too