1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
load("test-common.js"); try { var number = 0; while (number < 9) { number++; } assert(number === 9); number = 0; while(number < 3) number++; assert(number === 3); while (false) { assertNotReached(); } console.log("PASS"); } catch (e) { console.log("FAIL: " + e); }