Skip to content

Commit

Permalink
Replace assertThatCode() with assertThatThrownBy() (we always expect …
Browse files Browse the repository at this point in the history
…to throw)
  • Loading branch information
FourteenBrush committed Jun 16, 2024
1 parent 917a59d commit c6d2070
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ void testBooleanTruthTables() {

assertThat(ExpressionParser.parse("~1")).isEqualTo(~1);
assertThat(ExpressionParser.parse("~0")).isEqualTo(~0);
assertThatCode(() -> ExpressionParser.parse("~-1.5")).isInstanceOf(SyntaxException.class);
assertThatCode(() -> ExpressionParser.parse("~2.3")).isInstanceOf(SyntaxException.class);
assertThatThrownBy(() -> ExpressionParser.parse("~-1.5")).isInstanceOf(SyntaxException.class);
assertThatThrownBy(() -> ExpressionParser.parse("~2.3")).isInstanceOf(SyntaxException.class);
assertThat(ExpressionParser.parse("~8")).isEqualTo(~8);
assertThat(ExpressionParser.parse("~(2+~9)")).isEqualTo(~(2+~9));

Expand Down

0 comments on commit c6d2070

Please sign in to comment.