Wed, 31 Dec 2014 13:27:57 +0100
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 * Properties of the object being enumerated may be deleted during enumeration
6 *
7 * @path ch12/12.6/12.6.4/S12.6.4_A7_T2.js
8 * @description Checking "for (var VariableDeclarationNoIn in Expression) Statement" case
9 */
11 __obj={aa:1,ba:2,ca:3};
13 __accum="";
15 for (var __key in __obj){
17 erasator_T_1000(__obj,"b");
19 __accum+=(__key+__obj[__key]);
21 }
24 //////////////////////////////////////////////////////////////////////////////
25 //CHECK#1
26 if (!((__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1))) {
27 $ERROR('#1: (__accum.indexOf("aa1")!==-1)&&(__accum.indexOf("ca3")!==-1)');
28 }
29 //
30 //////////////////////////////////////////////////////////////////////////////
32 //////////////////////////////////////////////////////////////////////////////
33 //CHECK#2
34 if (__accum.indexOf("ba2")!==-1) {
35 $ERROR('#2: __accum.indexOf("ba2") === -1. Actual: __accum.indexOf("ba2") ==='+ __accum.indexOf("ba2") );
36 }
37 //
38 //////////////////////////////////////////////////////////////////////////////
41 // erasator is the hash map terminator
42 function erasator_T_1000(hash_map, charactr){
43 for (key in hash_map){
44 if (key.indexOf(charactr)===0) {
45 delete hash_map[key];
46 };
47 }
48 }