rem: for (var len = 0; len < testArray.length + 2; len++) 
add: for (var i = 0; i < testArray.length; ++i) actualSpliced.push(testArray[i]);  actualRemoved   = actualSpliced.splice(first,len); expectedRemoved = mySplice(testArray,expectedSpliced,first,len,[]);  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)) ) 
context: function exhaustiveSpliceTest(testname, testArray){    var errorMessage;    var passed = true;    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);	    expectedRemoved = mySplice(testArray,expectedSpliced,first,len,[]);	    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'\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) + "\n";		writeHeaderToLog(errorMessage);		reason = reason + 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/2007_temp/2007/8395/3703c3c05f398a63e55992f7687ef65273b26d6a/splice1.js/buggy/js/tests/js1_2/Array/splice1.js