rem: var actualSpliced   = []; var expectedSpliced = []; var actualRemoved   = []; var expectedRemoved = []; 
add: 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; } 
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: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/4218d0f5950d93cb2609d946f6af7ce1b2e89575/splice1.js/clean/js/tests/js1_2/Array/splice1.js