blob: 3c9619894e07a86859d813e61a90e7a4f14e1d5b [file] [log] [blame]
//@ runFTLNoCJIT
// This test passes if it does not crash or trigger any assertion failures.
var getHiddenValue = $vm.getHiddenValue;
var setHiddenValue = $vm.setHiddenValue;
function shouldEqual(actual, expected) {
if (actual != expected) {
throw "ERROR: expect " + expected + ", actual " + actual;
}
}
function test(testAction, expectedException) {
var exception;
try {
testAction();
} catch (e) {
exception = e;
}
shouldEqual(exception, expectedException);
}
test(() => { getHiddenValue(); }, "TypeError: Invalid use of getHiddenValue test function");
test(() => { getHiddenValue({}); }, "TypeError: Invalid use of getHiddenValue test function");
test(() => { setHiddenValue(); }, "TypeError: Invalid use of setHiddenValue test function");
test(() => { setHiddenValue({}); }, "TypeError: Invalid use of setHiddenValue test function");