Readable assertion messages on failure.#155
Conversation
|
Thank you @CaptnCodr |
Yes, I did now. While writing the tests we may consider to have an operator that returns a full exception to check it's types and messages. You come not far with |
|
In the last commit I merged the assertion syntax from Xunit to MsTest tests to have tests identical. |
|
|
||
| [<TestMethod>] member test. | ||
| ``11.1 should be greater than 11.0`` ()= | ||
| ``11,1 should be greater than 11,0`` ()= |
There was a problem hiding this comment.
Why you replaced . in test names by ,?
There was a problem hiding this comment.
This tests with . doesn't show up in my test explorer. Should I undo this?
There was a problem hiding this comment.
I discovered that tests with period in their name are shown in a separate section within the test explorer.
In the coming PR I will undo this, because they're still there. I'm not satisfied with the , or other sequences (e.g. ..) inside the test name.
There was a problem hiding this comment.
|
Merged and released as v3.9.0 |
|
Thank you guys! |
This fixes the assertion for Xunit and MsTest in #154 which prints on e.g.:
Ok "hello" |> should equal (Ok "world")This result on failure:
Equals Ok "world" was Microsoft.FSharp.Core.FSharpResult`2[System.String,System.Object]It's now printing:
Equals Ok "world" was Ok "hello"Btw. I made some code cleanup.