From c6ba9f4340afdce1c0cbf9ecf2b9fb8fbc49b3bf Mon Sep 17 00:00:00 2001 From: Liam Miller-Cushon Date: Mon, 11 Sep 2023 09:20:33 -0700 Subject: [PATCH] Double-check that `-XepOpt:BooleanFlag` and `-XepOpt:BooleanFlag=true` are equivalent PiperOrigin-RevId: 564407730 --- .../test/java/com/google/errorprone/ErrorProneFlagsTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check_api/src/test/java/com/google/errorprone/ErrorProneFlagsTest.java b/check_api/src/test/java/com/google/errorprone/ErrorProneFlagsTest.java index c1f1f07d91b..b4bb00e8757 100644 --- a/check_api/src/test/java/com/google/errorprone/ErrorProneFlagsTest.java +++ b/check_api/src/test/java/com/google/errorprone/ErrorProneFlagsTest.java @@ -53,10 +53,12 @@ public void parseAndGetBoolean() { .parseFlag("-XepOpt:Arg1=tRuE") .parseFlag("-XepOpt:Arg2=FaLsE") .parseFlag("-XepOpt:Arg3=yes") + .parseFlag("-XepOpt:Arg4") .build(); assertThat(flags.getBoolean("Arg1")).hasValue(true); assertThat(flags.getBoolean("Arg2")).hasValue(false); assertThrows(IllegalArgumentException.class, () -> flags.getBoolean("Arg3")); + assertThat(flags.getBoolean("Arg4")).hasValue(true); assertThat(flags.getBoolean("absent")).isEmpty(); }