
The addition of assert functions to Userland/js was done before we had load(..) implemented. Now that it exists, it seems like the right move the test helper functions to pure javascript instead of poluting js with random global functions.
11 lines
199 B
JavaScript
11 lines
199 B
JavaScript
load("test-common.js");
|
|
|
|
try {
|
|
var a = 1, b = 2, c = a + b;
|
|
assert(a === 1);
|
|
assert(b === 2);
|
|
assert(c === 3);
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|