On Thu, Jul 25, 2024 at 6:56 PM sebb wrote:
>
> On Thu, 25 Jul 2024 at 17:46, Gary Gregory wrote:
> >
> > Java assertions only make sense in specific cases.
> >
> > Never in test code, use JUnit for that (or TestNG).
> >
> > It might make sense in low level libraries to enable some semantic check
On Thu, 25 Jul 2024 at 17:46, Gary Gregory wrote:
>
> Java assertions only make sense in specific cases.
>
> Never in test code, use JUnit for that (or TestNG).
>
> It might make sense in low level libraries to enable some semantic checking
> which can be enabled on the CLI. This might be more con
Java assertions only make sense in specific cases.
Never in test code, use JUnit for that (or TestNG).
It might make sense in low level libraries to enable some semantic checking
which can be enabled on the CLI. This might be more convenient instead of
"if debug is on AND some condition then thro
I'm not convinced that it ever makes sense to use assert checks in our code.
In the case of test code, it seems to me that a JUnit assertion makes
more sense, as it is unconditionally checked.
In main code, does it make sense to use a check that is not guaranteed to run?
I would expect to see an