I believe the following test should fail, but it doesn’t? ConsoleApplication.zip (8.3 KB)
Elements 2619, Island/Windows
method SecondTest;
begin
Check.IsTrue(false);
Check.AreEqual(true, false);
end;
I believe the following test should fail, but it doesn’t? ConsoleApplication.zip (8.3 KB)
Elements 2619, Island/Windows
method SecondTest;
begin
Check.IsTrue(false);
Check.AreEqual(true, false);
end;
Curious; this must be specific to Island, for .NET I get
method SecondTest;
begin
Check.IsTrue(false); // EUNIT Expected condition to be true, but it was false
Check.AreEqual(true, false); // EUNIT Expected "False" but got "True"
end;
Note that check will not throw an exception, like Assert does. it will just emit the failure, and keep going.
I’ll test own Windows later; but since this is the same code, i’s odd that this would fail Island only, and might be a deeper problem than a bug in EUnit itself…
The code (on Windows Island) simply reports success without any fail message
for any Check? ok, I’ll have a look later today, when I have my Windows VM up…
Yes. Any check.
Hmm. my colleague just checked, and he cant reproduce this :(. what could we be missing, stop wise?
Using this sample project? ConsoleApplication.zip (8.3 KB)
I expect the following code would fail, but it didn’t.
method SecondTest;
begin
Check.IsTrue(false);
Check.AreEqual(true, false);
end;
what am I missing?
this is your solution, open unchanged (except to change the arch, since my VM is arm64, which doesn’t work yet) and press Ctrl+T.
I am not sure but if running in console shouldn’t it output some error messages saying the test case failed?
What I saw is that all test cases passed with success
Got it, yes. Check emits messages, but doesn’t mark the whole method as failed. fixed now (post 2621)
fix is committed, so if you rebuild latest EUnit yourself from github, you can use it before next week has it included.