node/deps/v8/tools/clusterfuzz/js_fuzzer/resources/jstest_stubs.js
Michaël Zasso a1d639ba5d
deps: update V8 to 8.6.395
PR-URL: https://github.com/nodejs/node/pull/35415
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
2020-10-18 20:16:47 +02:00

42 lines
1.1 KiB
JavaScript

// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Minimally stub out methods from JSTest's standalone-pre.js.
function description(msg) {}
function debug(msg) {}
function shouldBe(_a) {
print((typeof _a == "function" ? _a() : eval(_a)));
}
function shouldBeTrue(_a) { shouldBe(_a); }
function shouldBeFalse(_a) { shouldBe(_a); }
function shouldBeNaN(_a) { shouldBe(_a); }
function shouldBeNull(_a) { shouldBe(_a); }
function shouldNotThrow(_a) { shouldBe(_a); }
function shouldThrow(_a) { shouldBe(_a); }
function noInline() {}
function finishJSTest() {}
// Stub out $vm.
try {
$vm;
} catch(e) {
const handler = {
get: function(x, prop) {
if (prop == Symbol.toPrimitive) {
return function() { return undefined; };
}
return dummy;
},
};
const dummy = new Proxy(function() { return dummy; }, handler);
this.$vm = dummy;
}
// Other functions.
function ensureArrayStorage() {}
function transferArrayBuffer() {}