aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite/sputnik_converted/08_Types/8.6_The_Object_Type/S8.6_A2_T2.js
blob: e729e2f033fbde00c4fe34e1b5c1e78dc7d9ec06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/**
* @name: S8.6_A2_T2;
* @section: 8.6, 11.3.1;
* @assertion: Do not crash with postincrement custom property;
* @description: Try to implement postincrement for not declared custom property;
*/


// Converted for Test262 from original Sputnik source

ES5Harness.registerTest( {
id: "S8.6_A2_T2",

path: "TestCases/08_Types/8.6_The_Object_Type/S8.6_A2_T2.js",

assertion: "Do not crash with postincrement custom property",

description: "Try to implement postincrement for not declared custom property",

test: function testcase() {
   var __map={};

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if (!isNaN(__map.foo++)) {
  $ERROR('#1: var __map={}; __map.foo === Not-a-Number. Actual: ' + (__map.foo));
}
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (!("foo" in __map)) {
  $ERROR('#2: var __map={}; "foo" in __map');
}
//
//////////////////////////////////////////////////////////////////////////////

 }
});