~ubuntu-branches/ubuntu/raring/qtwebkit-source/raring-proposed

« back to all changes in this revision

Viewing changes to Source/JavaScriptCore/tests/mozilla/ecma_2/Exceptions/expression-008.js

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-02-18 14:24:18 UTC
  • Revision ID: package-import@ubuntu.com-20130218142418-eon0jmjg3nj438uy
Tags: upstream-2.3
ImportĀ upstreamĀ versionĀ 2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
    File Name:          expression-008
 
3
    Corresponds To:     11.2.2-3-n.js
 
4
    ECMA Section:       11.2.2. The new operator
 
5
    Description:
 
6
    Author:             christine@netscape.com
 
7
    Date:               12 november 1997
 
8
*/
 
9
    var SECTION = "expression-008";
 
10
   var VERSION = "JS1_4";
 
11
    var TITLE   = "The new operator";
 
12
 
 
13
    startTest();
 
14
    writeHeaderToLog( SECTION + " "+ TITLE);
 
15
 
 
16
    var tc = 0;
 
17
    var testcases = new Array();
 
18
 
 
19
    var NULL = null;
 
20
    var result = "Failed";
 
21
    var exception = "No exception thrown";
 
22
    var expect = "Passed";
 
23
 
 
24
    try {
 
25
        result = new NULL();
 
26
    } catch ( e ) {
 
27
        result = expect;
 
28
        exception = e.toString();
 
29
    }
 
30
 
 
31
    testcases[tc++] = new TestCase(
 
32
        SECTION,
 
33
        "NULL = null; result = new NULL()" +
 
34
        " (threw " + exception +")",
 
35
        expect,
 
36
        result );
 
37
 
 
38
    test();