Some test assertion frameworks allow you to add a custom message to your assertion, such as the following using NUnit:
Assert.AreEqual(1, result, "the result should be one")
Is it possible to do the same when using Unquote in F#?
test <@ result = 1 @>
Update
The closest I have got to this is to add a simple comment inside the quoted expression. As my motivation for this was to document what is being verified (I tend to assert more than once!), this is quite adequate for my needs.
test <@
// the result should be one
result = 1
@>
Another Update
I've been using Stephen's suggestion to use ignore "description here";, which I really like. I find it easier to read if I declare my own function like so:
> let inline checking _ = ()
> let result = 2;;
> test <@ checking "the result should be one"; result = 1 @>;;
Test failed:
checking "the result should be one"; result = 1
(); result = 1
result = 1
2 = 1
false