summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/types/object/S8.6_A3_T2.js
blob: 6bf72e84134eaebdfcd258cdd369171ee0f462f1 (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
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: Do not crash with pefixincrement custom property
es5id: 8.6_A3_T2
description: Try to implement pefixincrement for not declared custom property
---*/

var __map={};

//////////////////////////////////////////////////////////////////////////////
//CHECK#1
assert.sameValue(++__map.foo, NaN, "++__map.foo");
//
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if (!("foo" in __map)) {
  throw new Test262Error('#2: var __map={}; "foo" in __map');
}
//
//////////////////////////////////////////////////////////////////////////////

reportCompare(0, 0);