]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/mozilla/ecma_2/Exceptions/function-001.js
2 * File Name: boolean-001.js
5 * http://scopus.mcom.com/bugsplat/show_bug.cgi?id=99232
7 * eval("function f(){}function g(){}") at top level is an error for JS1.2
8 * and above (missing ; between named function expressions), but declares f
9 * and g as functions below 1.2.
11 * Fails to produce error regardless of version:
14 * js> eval("function f(){}function g(){}")
17 * js> eval("function f(){}function g(){}")
19 * Author: christine@netscape.com
20 * Date: 11 August 1998
22 var SECTION
= "function-001.js";
23 var VERSION
= "JS_12";
24 var TITLE
= "functions not separated by semicolons are errors in version 120 and higher";
25 var BUGNUMBER
="10278";
28 writeHeaderToLog( SECTION
+ " "+ TITLE
);
31 var testcases
= new Array();
34 var exception
= "no exception thrown";
37 eval("function f(){}function g(){}");
40 exception
= e
.toString();
43 testcases
[tc
++] = new TestCase(
45 "eval(\"function f(){}function g(){}\") (threw "+exception
,
53 for ( tc
=0; tc
< testcases
.length
; tc
++ ) {
54 testcases
[tc
].passed
= writeTestCaseResult(
57 testcases
[tc
].description
+" = "+
58 testcases
[tc
].actual
);
60 testcases
[tc
].reason
+= ( testcases
[tc
].passed
) ? "" : "wrong value ";