~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/tests/js1_3/Script/function-001-n.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// |reftest| skip -- obsolete test
 
2
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 
3
/* This Source Code Form is subject to the terms of the Mozilla Public
 
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
6
 
 
7
 
 
8
/**
 
9
 *  File Name:          boolean-001.js
 
10
 *  Description:
 
11
 *
 
12
 *  http://scopus.mcom.com/bugsplat/show_bug.cgi?id=99232
 
13
 *
 
14
 *  eval("function f(){}function g(){}") at top level is an error for JS1.2
 
15
 *     and above (missing ; between named function expressions), but declares f
 
16
 *     and g as functions below 1.2.
 
17
 *
 
18
 * Fails to produce error regardless of version:
 
19
 * js> version(100)
 
20
 * 120
 
21
 * js> eval("function f(){}function g(){}")
 
22
 * js> version(120);
 
23
 * 100
 
24
 * js> eval("function f(){}function g(){}")
 
25
 * js>
 
26
 *  Author:             christine@netscape.com
 
27
 *  Date:               11 August 1998
 
28
 */
 
29
var SECTION = "function-001.js";
 
30
var VERSION = "JS_1.3";
 
31
var TITLE   = "functions not separated by semicolons are errors in version 120 and higher";
 
32
var BUGNUMBER="10278";
 
33
 
 
34
startTest();
 
35
writeHeaderToLog( SECTION + " "+ TITLE);
 
36
 
 
37
new TestCase(
 
38
  SECTION,
 
39
  "eval(\"function f(){}function g(){}\")",
 
40
  "error",
 
41
  eval("function f(){}function g(){}") );
 
42
 
 
43
test();
 
44
 
 
45