You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two tests failing for the VirtualStackTestpublic void testGetDirectory() fails because VirtualStack#getDirectory uses, "IJ.addSeparator" which changes the string. The simple fix is to change the test to:
Maybe the correct way would be to convert the original path and the returned path to a path object and make sure they point at the same place.
The second test public void testDeleteSlice() failes because VirtualStack#deleteSlice just returns if the stack is empty. The test implies the method should fail. Maybe the test needs to check another way, eg If the size doesn't change, then the delete failed?
Alternatively comment the two lines, and now it fails.
/** Deletes the specified slice, where {@literal 1<=n<=nslices}. */
public void deleteSlice(int n) {
#if (nSlices==0)
# return;
if (n<1 || n>nSlices)
throw new IllegalArgumentException("Argument out of range: "+n);
for (int i=n; i<nSlices; i++)
names[i-1] = names[i];
names[nSlices-1] = null;
nSlices--;
}
The text was updated successfully, but these errors were encountered:
There are two tests failing for the VirtualStackTest
public void testGetDirectory()
fails because VirtualStack#getDirectory uses, "IJ.addSeparator" which changes the string. The simple fix is to change the test to:Maybe the correct way would be to convert the original path and the returned path to a path object and make sure they point at the same place.
The second test
public void testDeleteSlice()
failes because VirtualStack#deleteSlice just returns if the stack is empty. The test implies the method should fail. Maybe the test needs to check another way, eg If the size doesn't change, then the delete failed?Alternatively comment the two lines, and now it fails.
The text was updated successfully, but these errors were encountered: