MCPcopy Create free account
hub / github.com/Snapchat/Valdi / evaluateHarness

Method evaluateHarness

tsn/src/test262/runner/main.cpp:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 }
84
85 bool evaluateHarness(const std::string& file,
86 std::string source,
87 std::string& error_type,
88 std::string& error_description) {
89 if (_context == nullptr) {
90 return true;
91 }
92
93 auto val = tsn_eval(_context, source.c_str(), source.length(), source.c_str(), TSN_EVAL_TYPE_GLOBAL);
94 if (tsn_is_exception(_context, val) != 0) {
95 decodeException(_context, error_type, error_description);
96 return false;
97 }
98 tsn_release(_context, val);
99 return true;
100 }
101
102 bool evaluateCompiledTest(
103 std::string& module, bool isStrict, bool isModule, std::string& error_type, std::string& error_description) {

Callers 1

evaluateTestCaseInternalFunction · 0.80

Calls 5

tsn_evalFunction · 0.85
tsn_is_exceptionFunction · 0.85
decodeExceptionFunction · 0.85
tsn_releaseFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected