mirror of
https://github.com/tc39/test262.git
synced 2025-08-28 05:18:32 +02:00
29 lines
867 B
JavaScript
29 lines
867 B
JavaScript
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/**
|
|
* Do not crash with pefixincrement custom property
|
|
*
|
|
* @path ch08/8.6/S8.6_A3_T2.js
|
|
* @description Try to implement pefixincrement for not declared custom property
|
|
*/
|
|
|
|
var __map={};
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//CHECK#1
|
|
if (!isNaN(++__map.foo)) {
|
|
$ERROR('#1: var __map={}; __map.foo++; __map.foo === Not-a-Number. Actual: ' + (__map.foo));
|
|
}
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//CHECK#2
|
|
if (!("foo" in __map)) {
|
|
$ERROR('#2: var __map={}; "foo" in __map');
|
|
}
|
|
//
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|