1 function kdeShouldBe(a, b, c)
4 debug(c+" .......... Passed");
6 debug(c+" .......... Failed");
17 kdeShouldBe(caught, true, "testing throw()");
20 // same as above but lacking a semicolon after throw
29 kdeShouldBe(caught, true, "testing throw()");
32 function testReferenceError()
37 var dummy = nonexistant; // throws reference error
43 kdeShouldBe(caught, true, "ReferenceError");
46 function testFunctionErrorHelper()
48 var a = b; // throws reference error
51 function testFunctionError()
55 testFunctionErrorHelper();
59 kdeShouldBe(caught, true, "error propagation in functions");
62 function testMathFunctionError()
73 kdeShouldBe(caught, true, "Math() error");
76 function testWhileAbortion()
80 while (a=b, 1) { // "endless error" in condition
89 var a = b; // error in body
94 kdeShouldBe(caught, 2, "Abort while() on error");
97 debug("Except a lot of errors. They should all be caught and lead to PASS");
100 testReferenceError();
102 testMathFunctionError();