2 "This tests that storing into something that is not array does not crash."
6 function storeFooByValOrDoArithmetic(o, p1, p2, v) {\n\
21 function runTheTest(p1, p2) {\n\
22 var o = new Object();\n\
23 o.foo = new Object();\n\
24 storeFooByValOrDoArithmetic(o, p1, p2, 1);\n\
28 function runWithPredicates(predicateArray) {
31 for (var i = 0; i < predicateArray.length; ++i) {
32 myCode += "result = runTheTest(" + predicateArray[i][0] + ", " + predicateArray[i][1] + ");\n";
33 myCode += "shouldBe(\"result\", " + predicateArray[i][2] + ");\n";
39 runWithPredicates([[true, true, "\"\\\"foo\\\"\""], [true, false, "\"\\\"foo\\\"\""], [false, true, "\"undefined\""], [false, false, "\"undefined\""]]);
40 runWithPredicates([[false, false, "\"undefined\""], [true, false, "\"\\\"foo\\\"\""], [false, true, "\"undefined\""], [true, true, "\"\\\"foo\\\"\""]]);
41 runWithPredicates([[true, true, "\"\\\"foo\\\"\""], [false, true, "\"undefined\""], [true, false, "\"\\\"foo\\\"\""], [false, false, "\"undefined\""]]);
42 runWithPredicates([[false, false, "\"undefined\""], [false, true, "\"undefined\""], [true, false, "\"\\\"foo\\\"\""], [true, true, "\"\\\"foo\\\"\""]]);