mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibJS: Convert some top-level tests to the new system
First test conversions! These look really good :)
This commit is contained in:
parent
4b8a3e6d78
commit
eea6041302
22 changed files with 464 additions and 451 deletions
|
@ -1,11 +1,19 @@
|
|||
try {
|
||||
;;;
|
||||
if (true);
|
||||
if (false); else if (false); else;
|
||||
while (false);
|
||||
do; while (false);
|
||||
test("empty semicolon statements", () => {
|
||||
expect(";;;").toEval();
|
||||
});
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
test("if with no body", () => {
|
||||
expect("if (true);").toEval();
|
||||
});
|
||||
|
||||
test("chained ifs with no bodies", () => {
|
||||
expect("if (false); else if (false); else;").toEval();
|
||||
});
|
||||
|
||||
test("while with no body", () => {
|
||||
expect("while (false);").toEval();
|
||||
});
|
||||
|
||||
test("do while with no body", () => {
|
||||
expect("do; while (false);").toEval();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue