Skip to content

Commit

Permalink
Added more tests to DynamicArray Contains method
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Rasmusson committed Jan 31, 2020
1 parent 082f680 commit aaf57e1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/test/java/datastructures/DynamicArrayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,18 @@ public void Contains() {
Assert.assertFalse(array.Contains("a"));
array.add("a");
Assert.assertTrue(array.Contains("a"));
array.add("b");
array.add("b");
array.add("c");
Assert.assertTrue(array.Contains("b"));
Assert.assertTrue(array.Contains("c"));
array.delete(3);
Assert.assertFalse(array.Contains("c"));
array.delete(2);
Assert.assertTrue(array.Contains("b"));
array.delete(1);
Assert.assertFalse(array.Contains("b"));
array.delete(0);
Assert.assertFalse(array.Contains("a"));
}
}

0 comments on commit aaf57e1

Please sign in to comment.