blob: e6994f7fd5cae10f3e4caf7e3d4a9bd25f804d6a [file] [log] [blame]
package com.google.example;
import static com.google.truth.Truth.assertThat;
import static org.junit.Assert.fail;
import com.google.common.base.Preconditions;
import java.util.List;
import java.util.Set;
import javax.annotations.Nullable;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@RunWith(JUnit4.class)
public class SomeTest {
<T> void check(@Nullable List<T> x) {
Preconditions.checkNodeNull(x);
}
void f() {
List<String> xs = null;
assertThat(xs).isNull();
try {
check(xs);
fail();
} catch (NullPointerException e) {
}
}
}