aboutsummaryrefslogtreecommitdiffstats
path: root/website/resources/scripts/testcases2/15.4.4.20.json
blob: b6b3178ec45d875d56f0dd9796da0f53f51621ea (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
{
 "testCollection": {
  "name": "15.4.4.20",
  "numTests": 224,
  "tests": [
   {
    "id": "15.4.4.20-0-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js",
    "description": "Array.prototype.filter must exist as a function",
    "test": "assertTrue((function testcase() {\n  var f = Array.prototype.filter;\n  if (typeof(f) === \"function\") {\n    return true;\n  }\n }).call(this));\n"
   },
   {
    "id": "15.4.4.20-0-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js",
    "description": "Array.prototype.filter.length must be 1",
    "test": "assertTrue((Array.prototype.filter.length === 1));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js",
    "description": "Array.prototype.filter applied to undefined throws a TypeError",
    "test": "assertTrue((function testcase() {\n        try {\n            Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined\n            return false;\n        } catch (ex) {\n            return ex instanceof TypeError;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js",
    "description": "Array.prototype.filter applied to the Math object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return '[object Math]' === Object.prototype.toString.call(obj);\n        }\n\n        try {\n            Math.length = 1;\n            Math[0] = 1;\n            var newArr = Array.prototype.filter.call(Math, callbackfn);\n            return newArr[0] === 1;\n        } finally {\n            delete Math[0];\n            delete Math.length;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js",
    "description": "Array.prototype.filter applied to Date object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Date;\n        }\n\n        var obj = new Date();\n        obj.length = 1;\n        obj[0] = 1;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === 1;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js",
    "description": "Array.prototype.filter applied to RegExp object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof RegExp;\n        }\n\n        var obj = new RegExp();\n        obj.length = 2;\n        obj[1] = true;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr[0] === true;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js",
    "description": "Array.prototype.filter applied to the JSON object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return '[object JSON]' === Object.prototype.toString.call(JSON);\n        }\n\n        try {\n            JSON.length = 1;\n            JSON[0] = 1;\n            var newArr = Array.prototype.filter.call(JSON, callbackfn);\n            return newArr[0] === 1;\n        } finally {\n            delete JSON.length;\n            delete JSON[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js",
    "description": "Array.prototype.filter applied to Error object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Error;\n        }\n\n        var obj = new Error();\n        obj.length = 1;\n        obj[0] = 1;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === 1;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js",
    "description": "Array.prototype.filter applied to the Arguments object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return '[object Arguments]' === Object.prototype.toString.call(obj);\n        }\n\n        var obj = (function () {\n            return arguments;\n        }(\"a\", \"b\"));\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === \"a\" && newArr[1] === \"b\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js",
    "description": "Array.prototype.filter applied to null throws a TypeError",
    "test": "assertTrue((function testcase() {\n        try {\n            Array.prototype.filter.call(null);\n            return false;\n        } catch (ex) {\n            return ex instanceof TypeError;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js",
    "description": "Array.prototype.filter applied to boolean primitive",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Boolean;\n        }\n\n        try {\n            Boolean.prototype[0] = true;\n            Boolean.prototype.length = 1;\n\n            var newArr = Array.prototype.filter.call(false, callbackfn);\n            return newArr[0] === true;\n\n        } finally {\n            delete Boolean.prototype[0];\n            delete Boolean.prototype.length;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js",
    "description": "Array.prototype.filter applied to Boolean Object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Boolean;\n        }\n\n        var obj = new Boolean(true);\n        obj.length = 2;\n        obj[0] = 11;\n        obj[1] = 12;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === 11 && newArr[1] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js",
    "description": "Array.prototype.filter applied to number primitive",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Number;\n        }\n\n        try {\n            Number.prototype[0] = 1;\n            Number.prototype.length = 1;\n\n            var newArr = Array.prototype.filter.call(2.5, callbackfn);\n            return newArr[0] === 1;\n        } finally {\n            delete Number.prototype[0];\n            delete Number.prototype.length;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js",
    "description": "Array.prototype.filter applied to Number object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Number;\n        }\n\n        var obj = new Number(-128);\n        obj.length = 2;\n        obj[0] = 11;\n        obj[1] = 12;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr[0] === 11 && newArr[1] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js",
    "description": "Array.prototype.filter applied to string primitive",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof String;\n        }\n\n        var newArr = Array.prototype.filter.call(\"abc\", callbackfn);\n\n        return newArr[0] === \"a\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js",
    "description": "Array.prototype.filter applied to String object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return obj instanceof String;\n        }\n\n        var obj = new String(\"abc\");\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === \"a\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-1-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js",
    "description": "Array.prototype.filter applied to Function object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj instanceof Function;\n        }\n\n        var obj = function (a, b) {\n            return a + b;\n        };\n        obj[0] = 11;\n        obj[1] = 9;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === 11 && newArr[1] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-10-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js",
    "description": "Array.prototype.filter doesn't mutate the Array on which it is called on",
    "test": "assertTrue((function testcase() {\n\n  function callbackfn(val, idx, obj)\n  {\n    return true;\n  }\n  var srcArr = [1,2,3,4,5];\n  srcArr.filter(callbackfn);\n  if(srcArr[0] === 1 &&\n     srcArr[1] === 2 &&\n     srcArr[2] === 3 &&\n     srcArr[3] === 4 &&\n     srcArr[4] === 5)\n  {\n    return true;\n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-10-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js",
    "description": "Array.prototype.filter returns new Array with length equal to number of true returned by callbackfn",
    "test": "assertTrue((function testcase() {\n\n  function callbackfn(val, idx, obj)\n  {\n    if(val % 2)\n      return true;\n    else\n      return false;\n  }\n  var srcArr = [1,2,3,4,5];\n  var resArr = srcArr.filter(callbackfn);\n  if(resArr.length === 3 &&\n     resArr[0] === 1 &&\n     resArr[1] === 3 &&\n     resArr[2] === 5)\n  {\n    return true;\n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-10-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js",
    "description": "Array.prototype.filter - subclassed array when length is reduced",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = 1;\n  \n  function cb(){return true;}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 1) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-10-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js",
    "description": "Array.prototype.filter doesn't visit expandos",
    "test": "assertTrue((function testcase() {\n\n  var callCnt = 0;\n  function callbackfn(val, idx, obj)\n  {\n    callCnt++;\n  }\n  var srcArr = [1,2,3,4,5];\n  srcArr[\"i\"] = 10;\n  srcArr[true] = 11;\n\n  var resArr = srcArr.filter(callbackfn);\n  if(callCnt == 5)\n  {\n    return true;\n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is own data property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var obj = {\n            0: 12,\n            1: 11,\n            2: 9,\n            length: 2\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is inherited accessor property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"length\", {\n            get: function () {\n                return 2;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is own accessor property without a get function",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = {\n            0: 11,\n            1: 12\n        };\n        Object.defineProperty(obj, \"length\", {\n            set: function () { },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js",
    "description": "Array.prototype.filter - 'length' is own accessor property without a get function that overrides an inherited accessor property",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        try {\n            Object.defineProperty(Object.prototype, \"length\", {\n                get: function () {\n                    return 2;\n                },\n                configurable: true\n            });\n\n            var obj = { 0: 12, 1: 11 };\n            Object.defineProperty(obj, \"length\", {\n                set: function () { },\n                configurable: true\n            });\n\n            var newArr = Array.prototype.filter.call(obj, callbackfn);\n            return newArr.length === 0 && !accessed;\n        } finally {\n            delete Object.prototype.length;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js",
    "description": "Array.prototype.filter applied to the Array-like object that 'length' is inherited accessor property without a get function",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var proto = {};\n        Object.defineProperty(proto, \"length\", {\n            set: function () { },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child[0] = 11;\n        child[1] = 12;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js",
    "description": "Array.prototype.filter applied to the Array-like object that 'length property doesn't exist",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 11, 1: 12 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js",
    "description": "Array.prototype.filter - 'length' is property of the global object",
    "test": "assertTrue((function testcase() {\n       \n        function callbackfn(val, idx, obj) {\n            return  obj.length === 2;\n        }\n\n        try {\n            var oldLen = fnGlobalObject().length;\n            fnGlobalObject()[0] = 12;\n            fnGlobalObject()[1] = 11;\n            fnGlobalObject()[2] = 9;\n            fnGlobalObject().length = 2;\n            var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);\n            return newArr.length === 2;\n        } finally {\n            delete fnGlobalObject()[0];\n            delete fnGlobalObject()[1];\n            delete fnGlobalObject()[2];\n            fnGlobalObject().length = oldLen;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js",
    "description": "Array.prototype.filter applied to the Arguments object, which implements its own property get method",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var func = function (a, b) {\n            var newArr = Array.prototype.filter.call(arguments, callbackfn);\n            return newArr.length === 2;\n        };\n\n        return func(12, 11);\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js",
    "description": "Array.prototype.filter applied to String object, which implements its own property get method",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 3;\n        }\n\n        var str = new String(\"012\");\n\n        var newArr = Array.prototype.filter.call(str, callbackfn);\n        return newArr.length === 3;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js",
    "description": "Array.prototype.filter applied to Function object, which implements its own property get method",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var fun = function (a, b) {\n            return a + b;\n        };\n        fun[0] = 12;\n        fun[1] = 11;\n        fun[2] = 9;\n\n        var newArr = Array.prototype.filter.call(fun, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js",
    "description": "Array.prototype.filter - 'length' is own data property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var newArr = [12, 11].filter(callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = { length: 3 };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 2;\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js",
    "description": "Array.prototype.filter - 'length' is own data property that overrides an inherited data property on an Array",
    "test": "assertTrue((function testcase() {\n\n        var arrProtoLen;\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        try {\n            arrProtoLen = Array.prototype.length;\n            Array.prototype.length = 0;\n            var newArr = [12, 11].filter(callbackfn);\n            return newArr.length === 2;\n        } finally {\n            Array.prototype.length = arrProtoLen;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js",
    "description": "Array.prototype.filter to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"length\", {\n            get: function () {\n                return 3;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        Object.defineProperty(child, \"length\", {\n            value: 2,\n            configurable: true\n        });\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is an inherited data property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = { length: 2 };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-2-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var obj = {};\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                return 2;\n            },\n            configurable: true\n        });\n\n        obj[0] = 12;\n        obj[1] = 11;\n        obj[2] = 9;\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is own accessor property that overrides an inherited data property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = { length: 3 };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n\n        Object.defineProperty(child, \"length\", {\n            get: function () {\n                return 2;\n            },\n            configurable: true\n        });\n\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-2-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js",
    "description": "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return obj.length === 2;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"length\", {\n            get: function () {\n                return 3;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n\n        Object.defineProperty(child, \"length\", {\n            get: function () {\n                return 2;\n            },\n            configurable: true\n        });\n\n        child[0] = 12;\n        child[1] = 11;\n        child[2] = 9;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n        return newArr.length === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-3-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js",
    "description": "Array.prototype.filter - value of 'length' is undefined",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 0, 1: 1, length: undefined };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is NaN)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 9, length: NaN };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js",
    "description": "Array.prototype.filter - 'length' is a string containing a positive number",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"2\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js",
    "description": "Array.prototype.filter - 'length' is a string containing a negative number",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"-4294967294\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js",
    "description": "Array.prototype.filter - 'length' is a string containing a decimal number",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"2.5\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js",
    "description": "Array.prototype.filter - 'length' is a string containing +/-Infinity",
    "test": "assertTrue((function testcase() {\n\n        var accessed1 = false;\n        var accessed2 = false;\n        var accessed3 = false;\n\n        function callbackfn1(val, idx, obj) {\n            accessed1 = true;\n            return true;\n        }\n\n        function callbackfn2(val, idx, obj) {\n            accessed2 = true;\n            return true;\n        }\n\n        function callbackfn3(val, idx, obj) {\n            accessed3 = true;\n            return true;\n        }\n\n        var obj1 = { 0: 9, length: \"Infinity\" };\n        var obj2 = { 0: 9, length: \"-Infinity\" };\n        var obj3 = { 0: 9, length: \"+Infinity\" };\n\n        var newArr1 = Array.prototype.filter.call(obj1, callbackfn1);\n        var newArr2 = Array.prototype.filter.call(obj2, callbackfn2);\n        var newArr3 = Array.prototype.filter.call(obj3, callbackfn3);\n\n        return !accessed1 && newArr1.length === 0 &&\n            !accessed2 && newArr2.length === 0 && \n            !accessed3 && newArr3.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js",
    "description": "Array.prototype.filter - 'length' is a string containing an exponential number",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"2E0\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js",
    "description": "Array.prototype.filter - 'length' is a string containing a hex number",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"0x0002\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js",
    "description": "Array.prototype.filter - 'length' is a string containing a number with leading zeros",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: \"0002.00\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js",
    "description": "Array.prototype.filter - value of 'length' is a string that can't convert to a number",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 9, length: \"asdf!_\" };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return !accessed && newArr.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js",
    "description": "Array.prototype.filter - value of 'length' is an Object which has an own toString method.",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: {\n                toString: function () {\n                    return '2';\n                }\n            }\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js",
    "description": "Array.prototype.filter applied on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, 1: 9, length: true };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-20",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js",
    "description": "Array.prototype.filter - value of 'length' is an Object which has an own valueOf method.",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: {\n                valueOf: function () {\n                    return 2;\n                }\n            }\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-21",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js",
    "description": "Array.prototype.filter - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
    "test": "assertTrue((function testcase() {\n\n        var firstStepOccured = false;\n        var secondStepOccured = false;\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: {\n                valueOf: function () {\n                    firstStepOccured = true;\n                    return {};\n                },\n                toString: function () {\n                    secondStepOccured = true;\n                    return '2';\n                }\n            }\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-22",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js",
    "description": "Array.prototype.filter throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var firstStepOccured = false;\n        var secondStepOccured = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 12,\n\n            length: {\n                valueOf: function () {\n                    firstStepOccured = true;\n                    return {};\n                },\n                toString: function () {\n                    secondStepOccured = true;\n                    return {};\n                }\n            }\n        };\n\n        try {\n            Array.prototype.filter.call(obj, callbackfn);\n            return false;\n        } catch (ex) {\n            return (ex instanceof TypeError) && !accessed && firstStepOccured && secondStepOccured;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-23",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js",
    "description": "Array.prototype.filter uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
    "test": "assertTrue((function testcase() {\n\n        var valueOfAccessed = false;\n        var toStringAccessed = false;\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var proto = {\n            valueOf: function () {\n                valueOfAccessed = true;\n                return 2;\n            }\n        };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n\n        child.toString = function () {\n            toStringAccessed = true;\n            return '1';\n        };\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: child\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-24",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js",
    "description": "Array.prototype.filter - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: 2.685\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-25",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js",
    "description": "Array.prototype.filter - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            1: 11,\n            2: 9,\n            length: -4294967294.5\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-28",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js",
    "description": "Array.prototype.filter - value of 'length' is boundary value (2^32)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = {\n            0: 12,\n            length: 4294967296\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return !accessed && newArr.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-29",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js",
    "description": "Array.prototype.filter - value of 'length' is boundary value (2^32 + 1)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {\n            0: 11,\n            1: 9,\n            length: 4294967297\n        };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is 0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 11, length: 0 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is +0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 11, length: +0 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is -0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 11, length: -0 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is positive)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: 2 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is negative)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 1: 11, 2: 9, length: -4294967294 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is Infinity)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 9, length: Infinity };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-3-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js",
    "description": "Array.prototype.filter - value of 'length' is a number (value is -Infinity)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return true;\n        }\n\n        var obj = { 0: 9, length: -Infinity };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && !accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is undefined",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter();    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js",
    "description": "Array.prototype.filter - the exception is not thrown if exception was thrown by step 2",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, 1: 12 };\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                throw new SyntaxError();\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj, undefined);\n            return false;\n        } catch (ex) {\n            return !(ex instanceof TypeError);\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-4-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js",
    "description": "Array.prototype.filter - the exception is not thrown if exception was thrown by step 3",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, 1: 12 };\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                return {\n                    toString: function () {\n                        throw new SyntaxError();\n                    }\n                };\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj, undefined);\n            return false;\n        } catch (ex) {\n            return !(ex instanceof TypeError);\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-4-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js",
    "description": "Array.prototype.filter - 'callbackfn' is a function",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (idx === 1) {\n                return val === 9;\n            }\n            return false;\n        }\n\n        var newArr = [11, 9].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js",
    "description": "Array.prototype.filter - calling with no callbackfn is the same as passing undefined for callbackfn",
    "test": "assertTrue((function testcase() {\n        var obj = { 10: 10 };\n        var lengthAccessed = false;\n        var loopAccessed = false;\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                lengthAccessed = true;\n                return 20;\n            },\n            configurable: true\n        });\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                loopAccessed = true;\n                return 10;\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj);\n            return false;\n        } catch (ex) {\n            return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-4-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js",
    "description": "Array.prototype.filter throws ReferenceError if callbackfn is unreferenced",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(foo);    \n  }\n  catch(e) {\n    if(e instanceof ReferenceError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is null",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(null);    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is boolean",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(true);    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is number",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(5);    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is string",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(\"abc\");    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js",
    "description": "Array.prototype.filter throws TypeError if callbackfn is Object without [[Call]] internal method",
    "test": "assertTrue((function testcase() {\n\n  var arr = new Array(10);\n  try {\n    arr.filter(new Object());    \n  }\n  catch(e) {\n    if(e instanceof TypeError)\n      return true;  \n  }\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-4-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js",
    "description": "Array.prototype.filter - side effects produced by step 2 are visible when an exception occurs",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, 1: 12 };\n\n        var accessed = false;\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                accessed = true;\n                return 2;\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj, null);\n            return false;\n        } catch (ex) {\n            return ex instanceof TypeError && accessed;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-4-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js",
    "description": "Array.prototype.filter - side effects produced by step 3 are visible when an exception occurs",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, 1: 12 };\n\n        var accessed = false;\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                return {\n                    toString: function () {\n                        accessed = true;\n                        return \"2\";\n                    }\n                };\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj, null);\n            return false;\n        } catch (ex) {\n            return ex instanceof TypeError && accessed;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-5-1-s",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20-5-1-s.js",
    "description": "Array.prototype.filter - thisArg not passed to strict callbackfn",
    "test": "assertTrue((function testcase() {\n  var innerThisCorrect = false;\n  \n  function callbackfn(val, idx, obj) {\n    \"use strict\";\n    innerThisCorrect = this===undefined;\n    return true;\n  }\n\n  [1].filter(callbackfn);\n  return innerThisCorrect;    \n }).call(this));\n",
    "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.filter))",
    "strict_only": ""
   },
   {
    "id": "15.4.4.20-5-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js",
    "description": "Array.prototype.filter - thisArg is passed",
    "test": "assertTrue((function testcase() {\n        this._15_4_4_20_5_1 = false;\n        var _15_4_4_20_5_1 = true;\n\n        function callbackfn(val, idx, obj) {\n            return this._15_4_4_20_5_1;\n        }\n        var srcArr = [1];\n        var resArr = srcArr.filter(callbackfn);\n        return resArr.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js",
    "description": "Array.prototype.filter - Array Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objArray = new Array(10);\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objArray;\n        }\n\n\n        var newArr = [11].filter(callbackfn, objArray);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js",
    "description": "Array.prototype.filter - String Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objString = new String();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objString;\n        }\n\n        var newArr = [11].filter(callbackfn, objString);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js",
    "description": "Array.prototype.filter - Boolean Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objBoolean = new Boolean();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objBoolean;\n        }\n\n        var newArr = [11].filter(callbackfn, objBoolean);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js",
    "description": "Array.prototype.filter - Number Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objNumber = new Number();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objNumber;\n        }\n\n        var newArr = [11].filter(callbackfn, objNumber);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js",
    "description": "Array.prototype.filter - the Math object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === Math;\n        }\n\n        var newArr = [11].filter(callbackfn, Math);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js",
    "description": "Array.prototype.filter - Date Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        var objDate = new Date();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objDate;\n        }\n\n        var newArr = [11].filter(callbackfn, objDate);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js",
    "description": "Array.prototype.filter - RegExp Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        var objRegExp = new RegExp();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objRegExp;\n        }\n\n        var newArr = [11].filter(callbackfn, objRegExp);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js",
    "description": "Array.prototype.filter - the JSON object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === JSON;\n        }\n\n        var newArr = [11].filter(callbackfn, JSON);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js",
    "description": "Array.prototype.filter - Error Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objError = new RangeError();\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objError;\n        }\n\n        var newArr = [11].filter(callbackfn, objError);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js",
    "description": "Array.prototype.filter - the Arguments object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var arg;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === arg;\n        }\n\n        (function fun() {\n            arg = arguments;\n        }(1, 2, 3));\n\n        var newArr = [11].filter(callbackfn, arg);\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js",
    "description": "Array.prototype.filter - thisArg is Object",
    "test": "assertTrue((function testcase() {\n  var res = false;\n  var o = new Object();\n  o.res = true;\n  function callbackfn(val, idx, obj)\n  {\n    return this.res;\n  }\n\n  var srcArr = [1];\n  var resArr = srcArr.filter(callbackfn,o);\n  if( resArr.length === 1)\n    return true;\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-21",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js",
    "description": "Array.prototype.filter - the global object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === fnGlobalObject();\n        }\n\n        var newArr = [11].filter(callbackfn, fnGlobalObject());\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-22",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js",
    "description": "Array.prototype.filter - boolean primitive can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this.valueOf() === false;\n        }\n\n        var newArr = [11].filter(callbackfn, false);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-23",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js",
    "description": "Array.prototype.filter - number primitive can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this.valueOf() === 101;\n        }\n\n        var newArr = [11].filter(callbackfn, 101);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-24",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js",
    "description": "Array.prototype.filter - string primitive can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this.valueOf() === \"abc\";\n        }\n\n        var newArr = [11].filter(callbackfn, \"abc\");\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-27",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js",
    "description": "Array.prototype.filter - Array.isArray(arg) returns true when arg is the returned array",
    "test": "assertTrue((function testcase() {\n\n        var newArr = [11].filter(function () { });\n\n        return Array.isArray(newArr);\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Array.isArray))"
   },
   {
    "id": "15.4.4.20-5-28",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js",
    "description": "Array.prototype.filter - the returned array is instanceof Array",
    "test": "assertTrue((function testcase() {\n\n        var newArr = [11].filter(function () { });\n\n        return newArr instanceof Array;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-29",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js",
    "description": "Array.prototype.filter - returns an array whose length is 0",
    "test": "assertTrue((function testcase() {\n\n        var newArr = [11].filter(function () { });\n\n        return newArr.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js",
    "description": "Array.prototype.filter - thisArg is Array",
    "test": "assertTrue((function testcase() {\n  var res = false;\n  var a = new Array();\n  a.res = true;\n  function callbackfn(val, idx, obj)\n  {\n    return this.res;\n  }\n\n  var srcArr = [1];\n  var resArr = srcArr.filter(callbackfn,a);\n  if( resArr.length === 1)\n    return true;\n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-30",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js",
    "description": "Array.prototype.filter - thisArg not passed",
    "test": "assertTrue((function testcase() {\n        function innerObj() {\n            this._15_4_4_20_5_30 = true;\n            var _15_4_4_20_5_30 = false;\n            \n            function callbackfn(val, idx, obj) {\n                return this._15_4_4_20_5_30;\n            }\n            var srcArr = [1];\n            var resArr = srcArr.filter(callbackfn);\n            this.retVal = resArr.length === 0;\n        }\n        return new innerObj().retVal;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js",
    "description": "Array.prototype.filter - thisArg is object from object template(prototype)",
    "test": "assertTrue((function testcase() {\n  var res = false;\n  function callbackfn(val, idx, obj)\n  {\n    return this.res;\n  }\n  \n  function foo(){}\n  foo.prototype.res = true;\n  var f = new foo();\n\n  var srcArr = [1];\n  var resArr = srcArr.filter(callbackfn,f);\n  if( resArr.length === 1)\n    return true;    \n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js",
    "description": "Array.prototype.filter - thisArg is object from object template",
    "test": "assertTrue((function testcase() {\n  var res = false;\n  function callbackfn(val, idx, obj)\n  {\n    return this.res;\n  }\n\n  function foo(){}\n  var f = new foo();\n  f.res = true;\n  \n  var srcArr = [1];\n  var resArr = srcArr.filter(callbackfn,f);\n  if( resArr.length === 1)\n    return true;    \n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js",
    "description": "Array.prototype.filter - thisArg is function",
    "test": "assertTrue((function testcase() {\n  var res = false;\n  function callbackfn(val, idx, obj)\n  {\n    return this.res;\n  }\n\n  function foo(){}\n  foo.res = true;\n  \n  var srcArr = [1];\n  var resArr = srcArr.filter(callbackfn,foo);\n  if( resArr.length === 1)\n    return true;    \n\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js",
    "description": "Array.prototype.filter - built-in functions can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === eval;\n        }\n\n        var newArr = [11].filter(callbackfn, eval);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-5-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js",
    "description": "Array.prototype.filter - Function Object can be used as thisArg",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        var objFunction = function () { };\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return this === objFunction;\n        }\n\n        var newArr = [11].filter(callbackfn, objFunction);\n\n        return newArr[0] === 11 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (empty array)",
    "test": "assertTrue((function testcase() {\n  function cb(){}\n  var a = [].filter(cb);\n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = null;\n  \n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = false;\n  \n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = 0;\n  \n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  f.length = '0';\n  \n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  \n  var o = { valueOf: function () { return 0;}};\n  f.length = o;\n  \n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  \n  var o = { toString: function () { return '0';}};\n  f.length = o;\n  \n  // objects inherit the default valueOf method of the Object object;\n  // that simply returns the itself. Since the default valueOf() method\n  // does not return a primitive value, ES next tries to convert the object\n  // to a number by calling its toString() method and converting the\n  // resulting string to a number.\n\n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-6-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js",
    "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with []",
    "test": "assertTrue((function testcase() {\n  foo.prototype = new Array(1, 2, 3);\n  function foo() {}\n  var f = new foo();\n  \n  f.length = [];\n  \n  // objects inherit the default valueOf method of the Object object;\n  // that simply returns the itself. Since the default valueOf() method\n  // does not return a primitive value, ES next tries to convert the object\n  // to a number by calling its toString() method and converting the\n  // resulting string to a number.\n  //\n  // The toString( ) method on Array converts the array elements to strings,\n  // then returns the result of concatenating these strings, with commas in\n  // between. An array with no elements converts to the empty string, which\n  // converts to the number 0. If an array has a single element that is a\n  // number n, the array converts to a string representation of n, which is\n  // then converted back to n itself. If an array contains more than one element,\n  // or if its one element is not a number, the array converts to NaN.\n\n  function cb(){}\n  var a = f.filter(cb);\n  \n  if (Array.isArray(a) &&\n      a.length === 0) {\n    return true;\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js",
    "description": "Array.prototype.filter doesn't consider new elements added to array after it is called",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            srcArr[2] = 3;\n            srcArr[5] = 6;\n            return true;\n        }\n\n        var srcArr = [1, 2, , 4, 5];\n        var resArr = srcArr.filter(callbackfn);\n        return resArr.length === 5;\n\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js",
    "description": "Array.prototype.filter considers new value of elements in array after it is called",
    "test": "assertTrue((function testcase() { \n \n  function callbackfn(val, idx, obj)\n  {    \n    srcArr[2] = -1;\n    srcArr[4] = -1;\n    if(val > 0)\n      return true;\n    else\n      return false;\n  }\n\n  var srcArr = [1,2,3,4,5];\n  var resArr = srcArr.filter(callbackfn);\n  if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4)\n      return true;  \n  \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js",
    "description": "Array.prototype.filter doesn't visit deleted elements in array after the call",
    "test": "assertTrue((function testcase() { \n \n  function callbackfn(val, idx, obj)\n  {\n    delete srcArr[2];\n    delete srcArr[4];\n    if(val > 0)\n      return true;\n    else\n      return false;\n   }\n\n  var srcArr = [1,2,3,4,5];\n  var resArr = srcArr.filter(callbackfn);\n  if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4 )    // two elements deleted\n      return true;  \n  \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js",
    "description": "Array.prototype.filter doesn't visit deleted elements when Array.length is decreased",
    "test": "assertTrue((function testcase() { \n \n  function callbackfn(val, idx, obj)\n  {\n    srcArr.length = 2;\n    return true;\n  }\n\n  var srcArr = [1,2,3,4,6];\n  var resArr = srcArr.filter(callbackfn);\n  if(resArr.length === 2 )\n      return true;  \n  \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js",
    "description": "Array.prototype.filter doesn't consider newly added elements in sparse array",
    "test": "assertTrue((function testcase() { \n \n  function callbackfn(val, idx, obj)\n  {\n    srcArr[1000] = 3;\n    return true;\n  }\n\n  var srcArr = new Array(10);\n  srcArr[1] = 1;\n  srcArr[2] = 2;\n  var resArr = srcArr.filter(callbackfn);\n  if( resArr.length === 2)    \n      return true;  \n  \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js",
    "description": "Array.prototype.filter visits deleted element in array after the call when same index is also present in prototype",
    "test": "assertTrue((function testcase() { \n \n  function callbackfn(val, idx, obj)\n  {\n    delete srcArr[2];\n    delete srcArr[4];\n    if(val > 0)\n      return true;\n    else\n      return false;\n   }\n\n  Array.prototype[4] = 5;\n  var srcArr = [1,2,3,4,5];\n  var resArr = srcArr.filter(callbackfn);\n  delete Array.prototype[4];\n  if(resArr.length === 4 && resArr[0] === 1 && resArr[3] == 5)    // only one element deleted\n      return true;  \n  \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js",
    "description": "Array.prototype.filter stops calling callbackfn once the array is deleted during the call",
    "test": "assertTrue((function testcase() {\n        var o = new Object();\n        o.srcArr = [1, 2, 3, 4, 5];\n\n        function callbackfn(val, idx, obj) {\n            delete o.srcArr;\n            if (val > 0)\n                return true;\n            else\n                return false;\n        }\n\n        var resArr = o.srcArr.filter(callbackfn);\n        return resArr.length === 5 && typeof o.srcArr === \"undefined\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js",
    "description": "Array.prototype.filter - no observable effects occur if len is 0",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return val > 10;\n        }\n\n        var obj = { 0: 11, 1: 12, length: 0 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return accessed === false && obj.length === 0 && newArr.length === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js",
    "description": "Array.prototype.filter - modifications to length don't change number of iterations",
    "test": "assertTrue((function testcase() {\n\n        var called = 0;\n\n        function callbackfn(val, idx, obj) {\n            called++;\n            return true;\n        }\n\n        var obj = { 1: 12, 2: 9, length: 2 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                obj.length = 3;\n                return 11;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 2 && 2 === called;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js",
    "description": "Array.prototype.filter - callbackfn not called for indexes never been assigned values",
    "test": "assertTrue((function testcase() { \n \n  var callCnt = 0;\n  function callbackfn(val, idx, obj)\n  {\n    callCnt++;\n    return false;\n  }\n\n  var srcArr = new Array(10);\n  srcArr[1] = undefined; //explicitly assigning a value\n  var resArr = srcArr.filter(callbackfn);\n  if( resArr.length === 0 && callCnt === 1)\n      return true;    \n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-b-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js",
    "description": "Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var obj = { 2: 2, length: 20 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                delete Object.prototype[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        try {\n            Object.prototype[1] = 1;\n            var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n            return newArr.length === 2 && newArr[1] !== 1;\n        } finally {\n            delete Object.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js",
    "description": "Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var arr = [0, , 2];\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                delete Array.prototype[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype[1] = 1;\n            var newArr = arr.filter(callbackfn);\n            return newArr.length === 2 && newArr[1] !== 1;\n        } finally {\n            delete Array.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js",
    "description": "Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var obj = { 0: 0, 1: 111, 2: 2, length: 10 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                delete obj[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        try {\n            Object.prototype[1] = 1;\n            var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n            return newArr.length === 3 && newArr[1] === 1;\n        } finally {\n            delete Object.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js",
    "description": "Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return val < 3 ? true : false;\n        }\n        var arr = [0, 111, 2];\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                delete arr[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype[1] = 1;\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 3 && newArr[1] === 1;\n        } finally {\n            delete Array.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js",
    "description": "Array.prototype.filter - decreasing length of array causes index property not to be visited",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var arr = [0, 1, 2, \"last\"];\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                arr.length = 3;\n                return 0;\n            },\n            configurable: true\n        });\n\n        var newArr = arr.filter(callbackfn);\n\n\n        return newArr.length === 3 && newArr[2] === 2;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js",
    "description": "Array.prototype.filter - decreasing length of array with prototype property causes prototype index property to be visited",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var arr = [0, 1, 2];\n\n        try {\n            Object.defineProperty(Array.prototype, \"2\", {\n                get: function () {\n                    return \"prototype\";\n                },\n                configurable: true\n            });\n\n            Object.defineProperty(arr, \"1\", {\n                get: function () {\n                    arr.length = 2;\n                    return 1;\n                },\n                configurable: true\n            });\n\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 3 && newArr[2] === \"prototype\";\n        } finally {\n            delete Array.prototype[2];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js",
    "description": "Array.prototype.filter - decreasing length of array does not delete non-configurable properties",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var arr = [0, 1, 2];\n\n        Object.defineProperty(arr, \"2\", {\n            get: function () {\n                return \"unconfigurable\";\n            },\n            configurable: false\n        });\n\n        Object.defineProperty(arr, \"1\", {\n            get: function () {\n                arr.length = 2;\n                return 1;\n            },\n            configurable: true\n        });\n\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 3 && newArr[2] === \"unconfigurable\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js",
    "description": "Array.prototype.filter - added properties in step 2 are visible here",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = {};\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                obj[2] = \"length\";\n                return 3;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === \"length\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-9-b-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js",
    "description": "Array.prototype.filter - deleted properties in step 2 are visible here",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var obj = { 2: 6.99, 8: 19 };\n\n        Object.defineProperty(obj, \"length\", {\n            get: function () {\n                delete obj[2];\n                return 10;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] !== 6.99;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
   },
   {
    "id": "15.4.4.20-9-b-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js",
    "description": "Array.prototype.filter - properties added into own object after current position are visited on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { length: 2 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                Object.defineProperty(obj, \"1\", {\n                    get: function () {\n                        return 6.99;\n                    },\n                    configurable: true\n                });\n                return 0;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 2 && newArr[1] === 6.99;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js",
    "description": "Array.prototype.filter - properties added into own object after current position are visited on an Array",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var arr = [0, , 2];\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                Object.defineProperty(arr, \"1\", {\n                    get: function () {\n                        return 6.99;\n                    },\n                    configurable: true\n                });\n                return 0;\n            },\n            configurable: true\n        });\n\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 3 && newArr[1] === 6.99;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js",
    "description": "Array.prototype.filter - properties can be added to prototype after current position are visited on an Array-like object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var obj = { length: 2 };\n\n        try {\n            Object.defineProperty(obj, \"0\", {\n                get: function () {\n                    Object.defineProperty(Object.prototype, \"1\", {\n                        get: function () {\n                            return 6.99;\n                        },\n                        configurable: true\n                    });\n                    return 0;\n                },\n                configurable: true\n            });\n\n            var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n            return newArr.length === 2 && Array[1] === 6.99;\n        } finally {\n            delete Object.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js",
    "description": "Array.prototype.filter - properties can be added to prototype after current position are visited on an Array",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var arr = [0, , 2];\n\n        try {\n            Object.defineProperty(arr, \"0\", {\n                get: function () {\n                    Object.defineProperty(Array.prototype, \"1\", {\n                        get: function () {\n                            return 6.99;\n                        },\n                        configurable: true\n                    });\n                    return 0;\n                },\n                configurable: true\n            });\n\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 3 && newArr[1] === 6.99;\n        } finally {\n            delete Array.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-b-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js",
    "description": "Array.prototype.filter - deleting own property causes index property not to be visited on an Array-like object",
    "test": "assertTrue((function testcase() {\n        var accessed = false;\n        var obj = { length: 2 };\n\n        function callbackfn(val, idx, o) {\n            accessed = true;\n            return true;\n        }\n\n        Object.defineProperty(obj, \"1\", {\n            get: function () {\n                return 6.99;\n            },\n            configurable: true\n        });\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                delete obj[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-b-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js",
    "description": "Array.prototype.filter - deleting own property causes index property not to be visited on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n        var arr = [1, 2];\n\n        Object.defineProperty(arr, \"1\", {\n            get: function () {\n                return \"6.99\";\n            },\n            configurable: true\n        });\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                delete arr[1];\n                return 0;\n            },\n            configurable: true\n        });\n\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 0;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        var kValue = {};\n        function callbackfn(val, idx, obj) {\n            return (idx === 5) && (val === kValue);\n        }\n\n        var obj = { 5: kValue, length: 100 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === kValue;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 2 && val === 12;\n        }\n\n        var arr = [];\n\n        Object.defineProperty(arr, \"2\", {\n            get: function () {\n                return 12;\n            },\n            configurable: true\n        });\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 0 && val === 11;\n        }\n\n        var proto = { 0: 5, 1: 6 };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 10;\n\n        Object.defineProperty(child, \"0\", {\n            get: function () {\n                return 11;\n            },\n            configurable: true\n        });\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js",
    "description": " Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return val === 111 && idx === 0;\n        }\n\n        var arr = [];\n        try {\n            Array.prototype[0] = 10;\n\n            Object.defineProperty(arr, \"0\", {\n                get: function () {\n                    return 111;\n                },\n                configurable: true\n            });\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 111;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return idx === 1 && val === 12;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"1\", {\n            get: function () {\n                return 6;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 10;\n\n        Object.defineProperty(child, \"1\", {\n            get: function () {\n                return 12;\n            },\n            configurable: true\n        });\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js",
    "description": " Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 0 && val === 11;\n        }\n\n        var arr = [];\n        try {\n            Object.defineProperty(Array.prototype, \"0\", {\n                get: function () {\n                    return 5;\n                },\n                configurable: true\n            });\n\n            Object.defineProperty(arr, \"0\", {\n                get: function () {\n                    return 11;\n                },\n                configurable: true\n            });\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 11;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited accessor property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return val === 11 && idx === 1;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"1\", {\n            get: function () {\n                return 11;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 20;\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited accessor property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 0 && val === 11;\n        }\n\n        try {\n            Object.defineProperty(Array.prototype, \"0\", {\n                get: function () {\n                    return 11;\n                },\n                configurable: true\n            });\n            var newArr = [, , , ].filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 11;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return undefined === val && idx === 1;\n        }\n\n        var obj = { length: 2 };\n        Object.defineProperty(obj, \"1\", {\n            set: function () { },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === undefined;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return undefined === val && idx === 0;\n        }\n\n        var arr = [];\n\n        Object.defineProperty(arr, \"0\", {\n            set: function () { },\n            configurable: true\n        });\n\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === undefined;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return undefined === val && idx === 1;\n        }\n\n        var obj = { length: 2 };\n        Object.defineProperty(obj, \"1\", {\n            set: function () { },\n            configurable: true\n        });\n        try {\n            Object.prototype[1] = 10;\n            var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n            return newArr.length === 1 && newArr[0] === undefined;\n        } finally {\n            delete Object.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (idx === 0) {\n                return val === 11;\n            }\n        }\n\n        var newArr = [11].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-20",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return undefined === val && idx === 0;\n        }\n\n        var arr = [];\n\n        Object.defineProperty(arr, \"0\", {\n            set: function () { },\n            configurable: true\n        });\n\n        try {\n            Array.prototype[0] = 100;\n            var newArr = arr.filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === undefined;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-21",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return val === undefined && idx === 1;\n        }\n\n        var proto = {};\n        Object.defineProperty(proto, \"1\", {\n            set: function () { },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 2;\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === undefined;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-22",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return undefined === val && idx === 0;\n        }\n\n        try {\n            Object.defineProperty(Array.prototype, \"0\", {\n                set: function () { },\n                configurable: true\n            });\n            var newArr = [, ].filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === undefined;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-23",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js",
    "description": "Array.prototype.filter - This object is the global object which contains index property",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 0 && val === 11;\n        }\n\n        try {\n            var oldLen = fnGlobalObject().length;\n            fnGlobalObject()[0] = 11;\n            fnGlobalObject().length = 1;\n            var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);\n            return newArr.length === 1 && newArr[0] === 11;\n        } finally {\n            delete fnGlobalObject()[0];\n            fnGlobalObject().length = oldLen;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-25",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js",
    "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return val === 11 && idx === 0;\n        }\n\n        var func = function (a, b) {\n            return Array.prototype.filter.call(arguments, callbackfn);\n        };\n\n        var newArr = func(11);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-26",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js",
    "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (idx === 0) {\n                return val === 11;\n            } else if (idx === 1) {\n                return val === 9;\n            } else {\n                return false;\n            }\n        }\n\n        var func = function (a, b) {\n            return Array.prototype.filter.call(arguments, callbackfn);\n        };\n        var newArr = func(11, 9);\n\n        return newArr.length === 2 && newArr[0] === 11 &&\n            newArr[1] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-27",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js",
    "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (idx === 0) {\n                return val === 11;\n            } else if (idx === 1) {\n                return val === 12;\n            } else if (idx === 2) {\n                return val === 9;\n            } else {\n                return false;\n            }\n        }\n\n        var func = function (a, b) {\n            return Array.prototype.filter.call(arguments, callbackfn);\n        };\n        var newArr = func(11, 12, 9);\n\n        return newArr.length === 3 && newArr[0] === 11 &&\n            newArr[1] === 12 && newArr[2] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-28",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js",
    "description": "Array.prototype.filter - element changed by getter on previous iterations is observed on an Array",
    "test": "assertTrue((function testcase() {\n\n        var preIterVisible = false;\n        var arr = [];\n\n        function callbackfn(val, idx, obj) {\n            return idx === 1 && val === 9;\n        }\n\n        Object.defineProperty(arr, \"0\", {\n            get: function () {\n                preIterVisible = true;\n                return 11;\n            },\n            configurable: true\n        });\n\n        Object.defineProperty(arr, \"1\", {\n            get: function () {\n                if (preIterVisible) {\n                    return 9;\n                } else {\n                    return 11;\n                }\n            },\n            configurable: true\n        });\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-29",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js",
    "description": "Array.prototype.filter - element changed by getter on previous iterations is observed on an Array-like object",
    "test": "assertTrue((function testcase() {\n        function callbackfn(val, idx, obj) {\n            return val === 9 && idx === 1;\n        }\n\n        var preIterVisible = false;\n        var obj = { length: 2 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                preIterVisible = true;\n                return 11;\n            },\n            configurable: true\n        });\n\n        Object.defineProperty(obj, \"1\", {\n            get: function () {\n                if (preIterVisible) {\n                    return 9;\n                } else {\n                    return 13;\n                }\n            },\n            configurable: true\n        });\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 9;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return (idx === 5) && (val === \"abc\");\n        }\n\n        var proto = { 0: 11, 5: 100 };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child[5] = \"abc\";\n        child.length = 10;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === \"abc\";\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-30",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js",
    "description": "Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            if (idx > 1) {\n                accessed = true;\n            }\n            return true;\n        }\n\n        var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n        Object.defineProperty(obj, \"1\", {\n            get: function () {\n                throw new RangeError(\"unhandle exception happened in getter\");\n            },\n            configurable: true\n        });\n\n        try {\n            Array.prototype.filter.call(obj, callbackfn);\n            return false;\n        } catch (ex) {\n            return (ex instanceof RangeError) && !accessed;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-31",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js",
    "description": "Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n        function callbackfn(val, idx, obj) {\n            if (idx > 1) {\n                accessed = true;\n            }\n            return true;\n        }\n\n        var arr = [];\n        arr[5] = 10;\n        arr[10] = 100;\n\n        Object.defineProperty(arr, \"1\", {\n            get: function () {\n                throw new RangeError(\"unhandle exception happened in getter\");\n            },\n            configurable: true\n        });\n\n        try {\n            arr.filter(callbackfn);\n            return false;\n        } catch (ex) {\n            return (ex instanceof RangeError) && !accessed;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return (idx === 0) && (val === 12);\n        }\n\n        try {\n            Array.prototype[0] = 11;\n            var newArr = [12].filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 12;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return idx === 0 && val === 11;\n        }\n\n        var proto = {};\n\n        Object.defineProperty(proto, \"0\", {\n            get: function () {\n                return 5;\n            },\n            configurable: true\n        });\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 2;\n        Object.defineProperty(child, \"0\", {\n            value: 11,\n            configurable: true\n        });\n        child[1] = 12;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-i-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js",
    "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return val === 11;\n        }\n\n        try {\n            Object.defineProperty(Array.prototype, \"0\", {\n                get: function () {\n                    return 9;\n                },\n                configurable: true\n            });\n            var newArr = [11].filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 11;\n        } finally {\n            delete Array.prototype[0];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
   },
   {
    "id": "15.4.4.20-9-c-i-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited data property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        var kValue = 'abc';\n\n        function callbackfn(val, idx, obj) {\n            return (idx === 5) && (val === kValue);\n        }\n\n        var proto = { 5: kValue };\n\n        var Con = function () { };\n        Con.prototype = proto;\n\n        var child = new Con();\n        child.length = 10;\n\n        var newArr = Array.prototype.filter.call(child, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === kValue;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-i-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js",
    "description": "Array.prototype.filter - element to be retrieved is inherited data property on an Array",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return (idx === 1) && (val === 13);\n        }\n\n        try {\n            Array.prototype[1] = 13;\n            var newArr = [, , , ].filter(callbackfn);\n\n            return newArr.length === 1 && newArr[0] === 13;\n        } finally {\n            delete Array.prototype[1];\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && ![, 1].hasOwnProperty(0))"
   },
   {
    "id": "15.4.4.20-9-c-i-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js",
    "description": "Array.prototype.filter - element to be retrieved is own accessor property on an Array-like object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return (idx === 0) && (val === 11);\n        }\n\n        var obj = { 10: 10, length: 20 };\n\n        Object.defineProperty(obj, \"0\", {\n            get: function () {\n                return 11;\n            },\n            configurable: true\n        });\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
   },
   {
    "id": "15.4.4.20-9-c-ii-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js",
    "description": "Array.prototype.filter - callbackfn called with correct parameters",
    "test": "assertTrue((function testcase() { \n \n  var bPar = true;\n  var bCalled = false;\n  function callbackfn(val, idx, obj)\n  {\n    bCalled = true;\n    if(obj[idx] !== val)\n      bPar = false;\n  }\n\n  var srcArr = [0,1,true,null,new Object(),\"five\"];\n  srcArr[999999] = -6.6;\n  var resArr = srcArr.filter(callbackfn);\n  \n  if(bCalled === true && bPar === true)\n    return true;\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js",
    "description": "Array.prototype.filter - callbackfn is called with 1 formal parameter",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val) {\n            return val > 10;\n        }\n        var newArr = [12].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js",
    "description": "Array.prototype.filter - callbackfn is called with 2 formal parameter",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx) {\n            return val > 10 && arguments[2][idx] === val;\n        }\n        var newArr = [11].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js",
    "description": "Array.prototype.filter - callbackfn is called with 3 formal parameter",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return val > 10 && obj[idx] === val;\n        }\n        var newArr = [11].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js",
    "description": "Array.prototype.filter - callbackfn that uses arguments object to get parameter value",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn() {\n            return arguments[2][arguments[1]] === arguments[0];\n        }\n        var newArr = [11].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js",
    "description": "Array.prototype.filter - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return this.valueOf() === false;\n        }\n\n        var obj = { 0: 11, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn, false);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js",
    "description": "Array.prototype.filter -'this' of 'callbackfn' is a Number object when T is not an object (T is a number)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, o) {\n            return 5 === this.valueOf();\n        }\n\n        var obj = { 0: 11, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn, 5);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js",
    "description": "Array.prototype.filter - 'this' of 'callbackfn' is an String object when T is not an object (T is a string)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return 'hello' === this.valueOf();\n        }\n\n        var obj = { 0: 11, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn, \"hello\");\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js",
    "description": "Array.prototype.filter - non-indexed properties are not called",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return val === 8;\n        }\n\n        var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js",
    "description": "Array.prototype.filter - callbackfn takes 3 arguments",
    "test": "assertTrue((function testcase() { \n \n  var parCnt = 3;\n  var bCalled = false\n  function callbackfn(val, idx, obj)\n  { \n    bCalled = true;\n    if(arguments.length !== 3)\n      parCnt = arguments.length;   //verify if callbackfn was called with 3 parameters\n  }\n\n  var srcArr = [0,1,2,3,4,5,6,7,8,9];\n  var resArr = srcArr.filter(callbackfn);\n  if(bCalled === true && parCnt === 3)\n    return true;\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-20",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js",
    "description": "Array.prototype.filter - callbackfn called with correct parameters (thisArg is correct)",
    "test": "assertTrue((function testcase() {\n\n        var thisArg = { threshold: 10 };\n\n        function callbackfn(val, idx, obj) {\n            return this === thisArg;\n        }\n\n        var obj = { 0: 11, length: 1 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-21",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js",
    "description": "Array.prototype.filter - callbackfn called with correct parameters (kValue is correct)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (idx === 0) {\n                return val === 11;\n            }\n\n            if (idx === 1) {\n                return val === 12;\n            }\n\n            return false;\n        }\n\n        var obj = { 0: 11, 1: 12, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-22",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js",
    "description": "Array.prototype.filter - callbackfn called with correct parameters (the index k is correct)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            if (val === 11) {\n                return idx === 0;\n            }\n\n            if (val === 12) {\n                return idx === 1;\n            }\n\n            return false;\n        }\n\n        var obj = { 0: 11, 1: 12, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-23",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js",
    "description": "Array.prototype.filter - callbackfn called with correct parameters (this object O is correct)",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, length: 2 };\n\n        function callbackfn(val, idx, o) {\n            return obj === o;\n        }\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js",
    "description": "Array.prototype.filter - k values are passed in ascending numeric order",
    "test": "assertTrue((function testcase() {\n\n        var arr = [0, 1, 2, 3, 4, 5];\n        var lastIdx = 0;\n        var called = 0;\n        function callbackfn(val, idx, o) {\n            called++;\n            if (lastIdx !== idx) {\n                return false;\n            } else {\n                lastIdx++;\n                return true;\n            }\n        }\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === called;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js",
    "description": "Array.prototype.filter - k values are accessed during each iteration and not prior to starting the loop on an Array",
    "test": "assertTrue((function testcase() {\n\n        var kIndex = [];\n        var called = 0;\n\n        //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n        function callbackfn(val, idx, obj) {\n            called++;\n            //Each position should be visited one time, which means k is accessed one time during iterations.\n            if (kIndex[idx] === undefined) {\n                //when current position is visited, its previous index should has been visited.\n                if (idx !== 0 && kIndex[idx - 1] === undefined) {\n                    return true;\n                }\n                kIndex[idx] = 1;\n                return false;\n            } else {\n                return true;\n            }\n        }\n        var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);\n\n        return newArr.length === 0 && called === 4;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js",
    "description": "Array.prototype.filter - arguments to callbackfn are self consistent",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, length: 1 };\n        var thisArg = {};\n\n        function callbackfn() {\n            return this === thisArg &&\n                arguments[0] === 11 &&\n                arguments[1] === 0 &&\n                arguments[2] === obj;\n        }\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js",
    "description": "Array.prototype.filter - unhandled exceptions happened in callbackfn terminate iteration",
    "test": "assertTrue((function testcase() {\n\n        var called = 0;\n\n        function callbackfn(val, idx, obj) {\n            called++;\n            if (called === 1) {\n                throw new Error(\"Exception occurred in callbackfn\");\n            }\n            return true;\n        }\n\n        var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n        try {\n            Array.prototype.filter.call(obj, callbackfn);\n            return false;\n        } catch (ex) {\n            return 1 === called && ex instanceof Error;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js",
    "description": "Array.prototype.filter - element changed by callbackfn on previous iterations is observed",
    "test": "assertTrue((function testcase() {\n\n        var obj = { 0: 11, 1: 12, length: 2 };\n\n        function callbackfn(val, idx, o) {\n            if (idx === 0) {\n                obj[idx + 1] = 8;\n            }\n            return val > 10;\n        }\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-ii-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js",
    "description": "Array.prototype.filter - callbackfn is called with 0 formal parameter",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn() {\n            return true;\n        }\n        var newArr = [11].filter(callbackfn);\n\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js",
    "description": "Array.prototype.filter - value of returned array element equals to 'kValue'",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, 1: 9, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        return newArr[0] === obj[0] && newArr[1] === obj[1];\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js",
    "description": "Array.prototype.filter - value of returned array element can be overwritten",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, 1: 9, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        try {\n            var tempVal = newArr[1];\n            newArr[1] += 1;\n            return newArr[1] !== tempVal;\n        } catch (ex) {\n            return false;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js",
    "description": "Array.prototype.filter - value of returned array element can be enumerated",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        var prop;\n        var enumerable = false;\n        for (prop in newArr) {\n            if (newArr.hasOwnProperty(prop)) {\n                if (prop === \"0\") {\n                    enumerable = true;\n                }\n            }\n        }\n\n        return enumerable;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js",
    "description": "Array.prototype.filter - value of returned array element can be changed or deleted",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, 1: 9, length: 2 };\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n        try {\n            var tempVal = newArr[1];\n            delete newArr[1];\n            return tempVal !== undefined && newArr[1] === undefined;\n        } catch (ex) {\n            return false;\n        }\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js",
    "description": "Array.prototype.filter - values of 'to' are passed in acending numeric order",
    "test": "assertTrue((function testcase() {\n\n        var arr = [0, 1, 2, 3, 4];\n        var lastToIdx = 0;\n        var called = 0;\n        function callbackfn(val, idx, obj) {\n            called++;\n            if (lastToIdx !== idx) {\n                return false;\n            } else {\n                lastToIdx++;\n                return true;\n            }\n        }\n        var newArr = arr.filter(callbackfn);\n\n        return newArr.length === 5 && called === 5;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js",
    "description": "Array.prototype.filter - values of 'to' are accessed during each iteration when 'selected' is converted to true and not prior to starting the loop",
    "test": "assertTrue((function testcase() {\n\n        var toIndex = [];\n        var called = 0;\n\n        //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n        function callbackfn(val, idx, obj) {\n            called++;\n            //Each position should be visited one time, which means 'to' is accessed one time during iterations.\n            if (toIndex[idx] === undefined) {\n                //when current position is visited, its previous index should has been visited.\n                if (idx !== 0 && toIndex[idx - 1] === undefined) {\n                    return false;\n                }\n                toIndex[idx] = 1;\n                return true;\n            } else {\n                return false;\n            }\n        }\n        var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);\n\n        return newArr.length === 4 && called === 4;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-1",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js",
    "description": "Array.prototype.filter - getOwnPropertyDescriptor(all true) of returned array element",
    "test": "assertTrue((function testcase() {\n  \n  function callbackfn(val, idx, obj){\n    if(val % 2)\n      return true; \n    else\n      return false;\n  }\n  var srcArr = [0,1,2,3,4];\n  var resArr = srcArr.filter(callbackfn);\n  if (resArr.length > 0){\n     var desc = Object.getOwnPropertyDescriptor(resArr, 1) \n     if(desc.value === 3 &&        //srcArr[1] = true\n       desc.writable === true &&\n       desc.enumerable === true &&\n       desc.configurable === true){\n         return true;\n    }\n  }\n }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-10",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js",
    "description": "Array.prototype.filter return value of callbackfn is a number (value is negative number)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return -5;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-11",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js",
    "description": "Array.prototype.filter return value of callbackfn is a number (value is Infinity)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return Infinity;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-12",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js",
    "description": "Array.prototype.filter return value of callbackfn is a number (value is -Infinity)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return -Infinity;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-13",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js",
    "description": "Array.prototype.filter return value of callbackfn is a number (value is NaN)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return NaN;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-14",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js",
    "description": "Array.prototype.filter return value of callbackfn is an empty string",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return \"\";\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-15",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js",
    "description": "Array.prototype.filter return value of callbackfn is a non-empty string",
    "test": "assertTrue((function testcase() {\n    \n        function callbackfn(val, idx, obj) {\n            return \"non-empty string\";\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-16",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js",
    "description": "Array.prototype.filter return value of callbackfn is a Function object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return function () { };\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-17",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js",
    "description": "Array.prototype.filter return value of callbackfn is an Array object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new Array(10);\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-18",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js",
    "description": "Array.prototype.filter return value of callbackfn is a String object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new String();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-19",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js",
    "description": "Array.prototype.filter return value of callbackfn is a Boolean object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new Boolean();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-2",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js",
    "description": "Array.prototype.filter - return value of callbackfn is undefined",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, o) {\n            accessed = true;\n            return undefined;\n        }\n\n        var obj = { 0: 11, length: 1 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return  newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-20",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js",
    "description": "Array.prototype.filter - return value of callbackfn is a Number object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new Number();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-21",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js",
    "description": "Array.prototype.filter - return value of callbackfn is the Math object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return Math;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-22",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js",
    "description": "Array.prototype.filter - return value of callbackfn is a Date object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new Date();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-23",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js",
    "description": "Array.prototype.filter - return value of callbackfn is a RegExp object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new RegExp();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-24",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js",
    "description": "Array.prototype.filter - return value of callbackfn is the JSON object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return JSON;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-25",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js",
    "description": "Array.prototype.filter - return value of callbackfn is an Error object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new EvalError();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-26",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js",
    "description": "Array.prototype.filter - return value of callbackfn is the Arguments object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return arguments;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-28",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js",
    "description": "Array.prototype.filter - return value of callbackfn is the global object",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return fnGlobalObject();\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-29",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js",
    "description": "Array.prototype.filter - false prevents element added to output Array",
    "test": "assertTrue((function testcase() {\n\n        var called = 0;\n\n        function callbackfn(val, idx, obj) {\n            called++;\n            return val > 10;\n        }\n\n        var obj = { 0: 11, 1: 8, length: 20 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 1 && newArr[0] !== 8 && called === 2;\n\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-3",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js",
    "description": "Array.prototype.filter - return value of callbackfn is null",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return null;\n        }\n\n        var obj = { 0: 11, length: 1 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-30",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js",
    "description": "Array.prototype.filter - return value (new Boolean(false)) of callbackfn is treated as true value",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return new Boolean(false);\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-4",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js",
    "description": "Array.prototype.filter - return value of callbackfn is a boolean (value is false)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return false;\n        }\n\n        var obj = { 0: 11, length: 1 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-5",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js",
    "description": "Array.prototype.filter - return value of callbackfn is a boolean (value is true)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return true;\n        }\n\n        var obj = { 0: 11, length: 1 };\n\n        var newArr = Array.prototype.filter.call(obj, callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-6",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js",
    "description": "Array.prototype.filter - return value of callbackfn is a number (value is 0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return 0;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-7",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js",
    "description": "Array.prototype.filter - return value of callbackfn is a number (value is +0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return +0;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-8",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js",
    "description": "Array.prototype.filter - return value of callbackfn is a nunmber (value is -0)",
    "test": "assertTrue((function testcase() {\n\n        var accessed = false;\n\n        function callbackfn(val, idx, obj) {\n            accessed = true;\n            return -0;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 0 && accessed;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   },
   {
    "id": "15.4.4.20-9-c-iii-9",
    "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js",
    "description": "Array.prototype.filter - return value of callbackfn is a number (value is positive number)",
    "test": "assertTrue((function testcase() {\n\n        function callbackfn(val, idx, obj) {\n            return 5;\n        }\n\n        var newArr = [11].filter(callbackfn);\n        return newArr.length === 1 && newArr[0] === 11;\n    }).call(this));\n",
    "precondition": "(fnExists(Array.prototype.filter))"
   }
  ]
 }
}