Skip to content

Commit bef25ee

Browse files
committed
minor editing of delete test
1 parent 675edd0 commit bef25ee

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/more-tests/delete.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11

22
// Testing the SyntaxError exception of the delete operator.
3+
// If this test fails completely (without $ERROR) then the exception was non-catchable, and most likely it was detected at parse time rather than at run time as it should have been.
34

45
var fun = function (){
56
"use strict";
6-
delete fundfd; // This should throw a SyntaxError exception at call time, not parsing time!
7-
$ERROR("#1.1: This code should return a SyntaxError exception.")
7+
delete x; // This should throw a SyntaxError exception at call time, not parsing time!
8+
$ERROR("#1.1: This code should throw a (catchable) SyntaxError exception.")
89
};
910

1011
try {
1112
fun ()
1213
} catch (e){
1314
if ((e instanceof SyntaxError) !== true){
14-
$ERROR("#1.2: This code should return a SyntaxError exception.");
15+
$ERROR("#1.2: The exception thrown by this code should have been a SyntaxError exception.");
1516
}
1617
}
1718

0 commit comments

Comments
 (0)