Den lör 16 juli 2022 kl 23:11 skrev James McCoy <james...@jamessan.com>:

> On Sat, Jul 16, 2022 at 10:49:50PM +0200, Daniel Sahlberg wrote:
> > dev@: I would prefer to commit this in two separate commits, first the
> test
> > cases and second the fix. But I could not find any way to "XFail" the
> test
> > case.
>
> You can use junit's Ignore annotation.
>
> [[[
> import org.junit.Ignore;
> ...
>     @Ignore
>     public void testNativeException() throws Throwable
> ]]]
>
> You can include a reason, too, if needed -- @Ignore("...").  There's no
> XFail, that I know of, but this will at least prevent it from running.
>

Thanks! However @Ignore (as I understand it) would sort of defeat the
reason for committing the test separately - my idea being that it should be
possible to checkout revision X and see that a testcase fails as expected
and then update to revision Y (with the fix) and see that the testcase now
succeeds.

I believe I will commit it all in one single commit to avoid leaving /trunk
in a broken state (even for just a few moments).

Kind regards,
Daniel

Reply via email to