Skip to content

Commit

Permalink
test zero-arg fail method
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Mar 27, 2024
1 parent db15961 commit 39aeb23
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ public void unconditionalFail() {
" }",
" return o1.toString();",
" }",
" String test5(@Nullable Object o1) {",
" if (o1 == null) {",
" Validation.fail();",
" }",
" return o1.toString();",
" }",
"}")
.doTest();
}
Expand Down Expand Up @@ -607,6 +613,10 @@ private CompilationTestHelper helper() {
" static void fail(String msg) {",
" throw new RuntimeException(msg);",
" }",
" @Contract(\" -> fail\")",
" static void fail() {",
" throw new RuntimeException(\"something failed\");",
" }",
" @Contract(\"true -> true; false -> false\")",
" static boolean identity(boolean value) {",
" return value;",
Expand Down

0 comments on commit 39aeb23

Please sign in to comment.