Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correcting test case file name. #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.List;
import org.junit.*;

public class LinkedListTest {
public class DoublyLinkedListTest {

static final int LOOPS = 10000;
static final int TEST_SZ = 40;
Expand Down Expand Up @@ -305,6 +305,13 @@ public void testRandomizedIndexOf() {
}
}

@Test
public void testContains() {
list.add(1);
assertTrue(list.contains(1));
assertFalse(list.contains(2));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to assert the linked list does not contain a certain value because there are an infinite number of numbers it does not contain. Perhaps check the size instead?

}

// Generate a list of random numbers
static List<Integer> genRandList(int sz) {
List<Integer> lst = new ArrayList<>(sz);
Expand Down