From a70a5f996c8c410cf00765e4d1fb6e7a5376a7eb Mon Sep 17 00:00:00 2001 From: Bastien Diederichs Date: Tue, 7 Mar 2023 09:46:46 +0100 Subject: [PATCH] Use different strings in test cases --- .../PreconditionsRulesTestInput.java | 16 ++++++++-------- .../PreconditionsRulesTestOutput.java | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestInput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestInput.java index 5aa98e5b410..1d94b329b8c 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestInput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestInput.java @@ -34,24 +34,24 @@ void testRequireNonNull() { if ("foo" == null) { throw new NullPointerException(); } - if (null == "foo") { + if (null == "bar") { throw new NullPointerException(); } - checkNotNull("foo"); - checkArgument("foo" != null); - checkArgument(null != "foo"); + checkNotNull("baz"); + checkArgument("qux" != null); + checkArgument(null != "quux"); } void testRequireNonNullWithMessage() { if ("foo" == null) { throw new NullPointerException("The string is null"); } - if (null == "foo") { + if (null == "bar") { throw new NullPointerException("The string is null"); } - checkNotNull("foo", "The string is null"); - checkArgument("foo" != null, "The string is null"); - checkArgument(null != "foo", "The string is null"); + checkNotNull("baz", "The string is null"); + checkArgument("qux" != null, "The string is null"); + checkArgument(null != "quux", "The string is null"); } void testCheckPositionIndex() { diff --git a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestOutput.java b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestOutput.java index 482099eb0d1..ed763f1eb7e 100644 --- a/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestOutput.java +++ b/error-prone-contrib/src/test/resources/tech/picnic/errorprone/refasterrules/PreconditionsRulesTestOutput.java @@ -30,18 +30,18 @@ void testCheckElementIndexWithMessage() { void testRequireNonNull() { requireNonNull("foo"); - requireNonNull("foo"); - requireNonNull("foo"); - requireNonNull("foo"); - requireNonNull("foo"); + requireNonNull("bar"); + requireNonNull("baz"); + requireNonNull("qux"); + requireNonNull("quux"); } void testRequireNonNullWithMessage() { requireNonNull("foo", "The string is null"); - requireNonNull("foo", "The string is null"); - requireNonNull("foo", "The string is null"); - requireNonNull("foo", "The string is null"); - requireNonNull("foo", "The string is null"); + requireNonNull("bar", "The string is null"); + requireNonNull("baz", "The string is null"); + requireNonNull("qux", "The string is null"); + requireNonNull("quux", "The string is null"); } void testCheckPositionIndex() {