js/src/tests/test262/ch11/11.1/11.1.5/S11.1.5_A1.4.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 // Copyright 2009 the Sputnik authors.  All rights reserved.
     2 // This code is governed by the BSD license found in the LICENSE file.
     4 /**
     5  * Evaluate the production ObjectLiteral: { Identifier : AssignmentExpression}
     6  *
     7  * @path ch11/11.1/11.1.5/S11.1.5_A1.4.js
     8  * @description Checking various properteis and contents of the object defined with "var object = {prop : true}"
     9  */
    11 var object = {prop : true};
    13 //CHECK#1
    14 if (typeof object !== "object") {
    15   $ERROR('#1: var object = {prop : true}; typeof object === "object". Actual: ' + (typeof object));
    16 }
    18 //CHECK#2
    19 if (object instanceof Object !== true) {
    20   $ERROR('#2: var object = {prop : true}; object instanceof Object === true');
    21 }
    23 //CHECK#3
    24 if (object.toString !== Object.prototype.toString) {
    25   $ERROR('#3: var object = {prop : true}; object.toString === Object.prototype.toString. Actual: ' + (object.toString));
    26 }
    28 //CHECK#4
    29 if (object["prop"] !== true) {
    30   $ERROR('#4: var object = {prop : true}; object["prop"] === true');
    31 }
    33 //CHECK#5
    34 if (object.prop !== true) {
    35   $ERROR('#5: var object = {prop : true}; object.prop === true');
    36 }

mercurial