From 3af06e22763c73de7621567d8f04e5e0f9afec74 Mon Sep 17 00:00:00 2001 From: Vincent Koeman Date: Fri, 6 Oct 2023 17:31:45 +0200 Subject: [PATCH] extend test --- .../errorprone/bugpatterns/JUnitSingleArgumentsTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java index 544b16a9189..4554d182073 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java @@ -9,6 +9,8 @@ void identification() { CompilationTestHelper.newInstance(JUnitSingleArguments.class, getClass()) .addSourceLines( "A.java", + "import static java.util.function.Function.identity;", + "import static java.util.Objects.requireNonNull;", "import static org.junit.jupiter.params.provider.Arguments.arguments;", "import java.util.stream.Stream;", "", @@ -19,6 +21,9 @@ void identification() { " // BUG: Diagnostic contains:", " arguments(1);", " arguments(1,2);", + " ", + " identity();", + " requireNonNull(null);", " }", "}") .doTest();