mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 18:35:07 +00:00
17 lines
365 B
JavaScript
17 lines
365 B
JavaScript
function assert(x) { if (!x) throw 1; }
|
|
|
|
try {
|
|
function foo() { }
|
|
assert(foo.length === 0);
|
|
assert((foo.length = 5) === 5);
|
|
assert(foo.length === 0);
|
|
|
|
function bar(a, b, c) {}
|
|
assert(bar.length === 3);
|
|
assert((bar.length = 5) === 5);
|
|
assert(bar.length === 3);
|
|
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|