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

Method evaluateCompiledTest

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

Source from the content-addressed store, hash-verified

100 }
101
102 bool evaluateCompiledTest(
103 std::string& module, bool isStrict, bool isModule, std::string& error_type, std::string& error_description) {
104 if (_context == nullptr) {
105 return true;
106 }
107
108 // TODO(rjaber): Add support for module/global loading, as well as isStrict enable/disable
109 auto val = tsn_load_module(_context, module.c_str());
110 if (tsn_is_exception(_context, val) != 0) {
111 decodeException(_context, error_type, error_description);
112 return false;
113 }
114 auto loadedModule = tsn_call(_context, val, tsn_undefined(_context), 0, NULL);
115 if (tsn_is_exception(_context, val) != 0) {
116 decodeException(_context, error_type, error_description);
117 return false;
118 }
119
120 tsn_release(_context, loadedModule);
121 tsn_release(_context, val);
122 return true;
123 }
124
125 ~realm() {
126 if (_context == nullptr) {

Callers 1

evaluateTestCaseInternalFunction · 0.80

Calls 6

tsn_load_moduleFunction · 0.85
tsn_is_exceptionFunction · 0.85
decodeExceptionFunction · 0.85
tsn_callFunction · 0.85
tsn_undefinedFunction · 0.85
tsn_releaseFunction · 0.85

Tested by

no test coverage detected