rem: var passed = true; var errorMessage; var reason = ""; for (var first = -(testArray.length+2); first <= 2 + testArray.length; first++) { var actualSpliced   = []; var expectedSpliced = []; var actualRemoved   = []; var expectedRemoved = []; 
add: actualSpliced   = []; expectedSpliced = []; 
context: 	function exhaustiveSpliceTestWithArgs(testname, testArray)	{	    var passed = true;	    var errorMessage;	    var reason = "";	    for (var first = -(testArray.length+2); first <= 2 + testArray.length; first++)	    {	        var actualSpliced   = [];	        var expectedSpliced = [];	        var actualRemoved   = [];	        var expectedRemoved = [];	        for (var len = 0; len < testArray.length + 2; len++)	        {	            actualSpliced   = [];	            expectedSpliced = [];	            for (var i = 0; i < testArray.length; ++i)	                actualSpliced.push(testArray[i]);	            actualRemoved   = actualSpliced.splice(first,len,-97,new String("test arg"),[],9.8);	            expectedRemoved = mySplice(testArray,expectedSpliced,first,len,[-97,new String("test arg"),[],9.8]);	            var adjustedFirst = first;	            if (adjustedFirst < 0) adjustedFirst = testArray.length + first;	            if (adjustedFirst < 0) adjustedFirst = 0;	            if (  (String(actualSpliced) != String(expectedSpliced))	                ||(String(actualRemoved) != String(expectedRemoved)))	            {	                if (  (String(actualSpliced) == String(expectedSpliced))	                    &&(String(actualRemoved) != String(expectedRemoved)) )	                    {	                    if ( (expectedRemoved.length == 1)	                        &&(String(actualRemoved) == String(expectedRemoved[0]))) continue;                        if ( expectedRemoved.length == 0  && actualRemoved == void 0 ) continue;                        }	                errorMessage =	                    "ERROR: 'TEST FAILED' ERROR: 'TEST FAILED' ERROR: 'TEST FAILED'\n" +	                    "             test: " + "a.splice(" + first + "," + len + ",-97,new String('test arg'),[],9.8)\n" +	                    "                a: " + String(testArray) + "\n" +	                    "   actual spliced: " + String(actualSpliced) + "\n" +	                    " expected spliced: " + String(expectedSpliced) + "\n" +	                    "   actual removed: " + String(actualRemoved) + "\n" +	                    " expected removed: " + String(expectedRemoved);	                reason = reason + errorMessage;	                writeHeaderToLog(errorMessage);	                passed = false;	            }	        }	    }	    var testcase = new TestCase(SECTION, testname, true, passed);	    if (!passed) testcase.reason = reason;	    return testcase;	}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f5797aeb2410e2259028142b87595fe71f03e531/splice2.js/buggy/js/tests/js1_2/Array/splice2.js