#include "include/v8-script.h"
#include <algorithm>
#include "include/v8-context.h"
#include "include/v8-isolate.h"
#include "include/v8-local-handle.h"
#include "include/v8-primitive.h"
#include "include/v8-template.h"
#include "src/objects/objects-inl.h"
#include "test/common/flag-utils.h"
#include "test/common/streaming-helper.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace {
namespace {
bool ValueEqualsString(v8::Isolate* isolate, Local<Value> lhs,
const char* rhs) { … }
std::string from_v8_string(Isolate* isolate, Local<String> str) { … }
v8::MaybeLocal<Module> ResolveToTopLevelAwait(Local<Context> context,
Local<String> specifier,
Local<FixedArray> assertions,
Local<Module> referrer) { … }
class ScriptTest : public TestWithContext { … };
class CompileHintsTest : public ScriptTest { … };
}
TEST_F(ScriptTest, UnboundScriptPosition) { … }
TEST_F(ScriptTest, GetSourceMappingUrlFromComment) { … }
TEST_F(ScriptTest, OriginSourceMapOverridesSourceMappingUrlComment) { … }
TEST_F(ScriptTest, IgnoreOriginSourceMapEmptyString) { … }
TEST_F(ScriptTest, GetSingleStalledTopLevelAwaitMessage) { … }
TEST_F(ScriptTest, GetMultipleStalledTopLevelAwaitMessage) { … }
TEST_F(ScriptTest, GetMixedStalledTopLevelAwaitMessage) { … }
TEST_F(ScriptTest, GetEmptyStalledTopLevelAwaitMessage) { … }
TEST_F(ScriptTest, ProduceCompileHints) { … }
TEST_F(ScriptTest, ProduceCompileHintsForArrowFunctions) { … }
namespace {
bool CompileHintsCallback(int position, void* data) { … }
}
TEST_F(CompileHintsTest, ConsumeCompileHints) { … }
TEST_F(CompileHintsTest, ConsumeCompileHintsForArrowFunctions) { … }
TEST_F(CompileHintsTest, StreamingCompileHints) { … }
TEST_F(ScriptTest, CompileHintsMagicCommentBasic) { … }
TEST_F(ScriptTest, CompileHintsMagicCommentBetweenFunctions) { … }
TEST_F(ScriptTest, CompileHintsMagicCommentInvalid) { … }
TEST_F(ScriptTest, CompileHintsMagicCommentInvalid2) { … }
TEST_F(ScriptTest, CompileHintsMagicCommentNotEnabledByCompileOptions) { … }
TEST_F(CompileHintsTest, StreamingCompileHintsMagic) { … }
}
}