mirror of
https://github.com/github/codeql.git
synced 2026-05-02 20:25:13 +02:00
Java: Respect Hamcrest assertThat(X, notNullValue())
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.hamcrest.core.IsNull.*;
|
||||
import static org.hamcrest.MatcherAssert.*;
|
||||
|
||||
public class A {
|
||||
public void notTest() {
|
||||
@@ -296,6 +298,12 @@ public class A {
|
||||
for (it = iter.iterator(); !!it.hasNext(); ) {}
|
||||
}
|
||||
|
||||
public void assertThatTest() {
|
||||
Object assertThat_ok1 = maybe() ? null : new Object();
|
||||
assertThat(assertThat_ok1, notNullValue());
|
||||
assertThat_ok1.toString();
|
||||
}
|
||||
|
||||
private boolean m;
|
||||
A(boolean m) {
|
||||
this.m = m;
|
||||
|
||||
Reference in New Issue
Block a user