Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 @@ -102,7 +102,7 @@ public void testListIterator_tooHigh() {
}

public void testListIterator_atSize() {
getList().listIterator(getNumElements());
assertNotNull(getList().listIterator(getNumElements()));
// TODO: run the iterator through ListIteratorTester
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ protected SortedMap<String, String> create(Entry<String, String>[] entries) {
}

public void testComparator() {
create().comparator();
assertNotNull(create().comparator());
}

public void testCeilingEntry() {
create().ceilingEntry("a");
assertNull(create().ceilingEntry("a"));
}

public void testCeilingKey() {
create().ceilingKey("a");
assertNull(create().ceilingKey("a"));
}

public void testDescendingKeySet() {
Expand All @@ -316,21 +316,21 @@ public void testDescendingMap() {
}

public void testFirstEntry() {
create().firstEntry();
assertNull(create().firstEntry());
}

public void testFirstKey() {
NavigableMap<String, Integer> map = create();
map.put("a", 1);
map.firstKey();
assertNotNull(map.firstKey());
}

public void testFloorEntry() {
create().floorEntry("a");
assertNull(create().floorEntry("a"));
}

public void testFloorKey() {
create().floorKey("a");
assertNull(create().floorKey("a"));
}

public void testHeadMap_k() {
Expand All @@ -348,29 +348,29 @@ public void testHeadMap_k_b() {
}

public void testHigherEntry() {
create().higherEntry("a");
assertNull(create().higherEntry("a"));
}

public void testHigherKey() {
create().higherKey("a");
assertNull(create().higherKey("a"));
}

public void testLastEntry() {
create().lastEntry();
assertNull(create().lastEntry());
}

public void testLastKey() {
NavigableMap<String, Integer> map = create();
map.put("a", 1);
map.lastKey();
assertNotNull(map.lastKey());
}

public void testLowerEntry() {
create().lowerEntry("a");
assertNull(create().lowerEntry("a"));
}

public void testLowerKey() {
create().lowerKey("a");
assertNull(create().lowerKey("a"));
}

public void testNavigableKeySet() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void assertFutureTimesOut(Future<?> future, long timeoutMillis) {
long startTime = System.nanoTime();
try {
future.get(timeoutMillis, MILLISECONDS);
shouldThrow();
fail("Should throw exception");
} catch (TimeoutException success) {
} catch (Exception e) {
threadUnexpectedException(e);
Expand All @@ -520,16 +520,6 @@ void assertFutureTimesOut(Future<?> future, long timeoutMillis) {
assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
}

/** Fails with message "should throw exception". */
public void shouldThrow() {
fail("Should throw exception");
}

/** Fails with message "should throw " + exceptionName. */
public void shouldThrow(String exceptionName) {
fail("Should throw " + exceptionName);
}

/** The number of elements to place in collections, arrays, etc. */
public static final int SIZE = 20;

Expand Down Expand Up @@ -1184,17 +1174,17 @@ void checkEmpty(BlockingQueue<?> q) {
assertFalse(q.iterator().hasNext());
try {
q.element();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
try {
q.iterator().next();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
try {
q.remove();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
} catch (InterruptedException ie) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void testListIterator_tooHigh() {
}

public void testListIterator_atSize() {
getList().listIterator(getNumElements());
assertNotNull(getList().listIterator(getNumElements()));
// TODO: run the iterator through ListIteratorTester
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ protected SortedMap<String, String> create(Entry<String, String>[] entries) {
}

public void testComparator() {
create().comparator();
assertNotNull(create().comparator());
}

public void testCeilingEntry() {
create().ceilingEntry("a");
assertNull(create().ceilingEntry("a"));
}

public void testCeilingKey() {
create().ceilingKey("a");
assertNull(create().ceilingKey("a"));
}

public void testDescendingKeySet() {
Expand All @@ -316,21 +316,21 @@ public void testDescendingMap() {
}

public void testFirstEntry() {
create().firstEntry();
assertNull(create().firstEntry());
}

public void testFirstKey() {
NavigableMap<String, Integer> map = create();
map.put("a", 1);
map.firstKey();
assertNotNull(map.firstKey());
}

public void testFloorEntry() {
create().floorEntry("a");
assertNull(create().floorEntry("a"));
}

public void testFloorKey() {
create().floorKey("a");
assertNull(create().floorKey("a"));
}

public void testHeadMap_k() {
Expand All @@ -348,29 +348,29 @@ public void testHeadMap_k_b() {
}

public void testHigherEntry() {
create().higherEntry("a");
assertNull(create().higherEntry("a"));
}

public void testHigherKey() {
create().higherKey("a");
assertNull(create().higherKey("a"));
}

public void testLastEntry() {
create().lastEntry();
assertNull(create().lastEntry());
}

public void testLastKey() {
NavigableMap<String, Integer> map = create();
map.put("a", 1);
map.lastKey();
assertNotNull(map.lastKey());
}

public void testLowerEntry() {
create().lowerEntry("a");
assertNull(create().lowerEntry("a"));
}

public void testLowerKey() {
create().lowerKey("a");
assertNull(create().lowerKey("a"));
}

public void testNavigableKeySet() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void assertFutureTimesOut(Future<?> future, long timeoutMillis) {
long startTime = System.nanoTime();
try {
future.get(timeoutMillis, MILLISECONDS);
shouldThrow();
fail("Should throw exception");
} catch (TimeoutException success) {
} catch (Exception e) {
threadUnexpectedException(e);
Expand All @@ -520,16 +520,6 @@ void assertFutureTimesOut(Future<?> future, long timeoutMillis) {
assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
}

/** Fails with message "should throw exception". */
public void shouldThrow() {
fail("Should throw exception");
}

/** Fails with message "should throw " + exceptionName. */
public void shouldThrow(String exceptionName) {
fail("Should throw " + exceptionName);
}

/** The number of elements to place in collections, arrays, etc. */
public static final int SIZE = 20;

Expand Down Expand Up @@ -1184,17 +1174,17 @@ void checkEmpty(BlockingQueue<?> q) {
assertFalse(q.iterator().hasNext());
try {
q.element();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
try {
q.iterator().next();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
try {
q.remove();
shouldThrow();
fail("Should throw exception");
} catch (NoSuchElementException success) {
}
} catch (InterruptedException ie) {
Expand Down
Loading