fscheck / FsCheck

Random Testing for .NET
https://fscheck.github.io/FsCheck/
BSD 3-Clause "New" or "Revised" License
1.15k stars 154 forks source link

FsCheck.NUnit does not properly handle NUnit's signalling exceptions. #627

Open teo-tsirpanis opened 1 year ago

teo-tsirpanis commented 1 year ago

Try this:

[FsCheck.NUnit.Property]
public void TestSuccess(int x)
{
    Assert.Pass();
}

The test should have passed but instead fails. I am using version 3.0.0-beta2.

kurtschelfthout commented 1 year ago

Yes, that's because every exception is interpreted as a fail. We need to filter for whatever exception NUnit throws from Assert.Pass in FsCheck.Nunit, I guess.