Skip to content
Snippets Groups Projects
Commit b3af2414 authored by anniemao's avatar anniemao
Browse files

Fix FilterEmpty JUNIT tests

parent 3362a3d4
Branches
No related tags found
No related merge requests found
......@@ -76,7 +76,12 @@ public class FilterEmptyTests {
}
private void runTest(String[] input, int[] expected) {
int[] result = FilterEmpty.filterEmpty(input);
String inputString = Arrays.toString(input);
if (inputString.length() > 0) {
inputString = inputString.substring(1, inputString.length() - 1);
}
String[] arr = inputString.replaceAll("\\s*", "").split(",");
int[] result = FilterEmpty.filterEmpty(arr);
assertNotNull(result);
assertEquals(Arrays.toString(expected), Arrays.toString(result));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment