SwensenSoftware / unquote

Write F# unit test assertions as quoted expressions, get step-by-step failure messages for free
http://www.swensensoftware.com/unquote
Apache License 2.0
287 stars 25 forks source link

operators =? not supported in xUnit #101

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.take the standard exemple => test fails  
[<Fact>]
let ``unquote - demo Unquote xUnit support`` () =
   test <@ ([3; 2; 1; 0] |> List.map ((+) 1)) = [1 + 3..1 + 0] @>

2. replace by the operator version => test passes
[<Fact>]
let ``unquote - demo Unquote xUnit support`` () =
  <@ ([3; 2; 1; 0] |> List.map ((+) 1)) =? [1 + 3..1 + 0] @>

What is the expected output? What do you see instead?
The test should fail

What version of the product are you using? On what operating system?
Unquote.2.2.2\lib\net40\Unquote.dll
xunit.1.9.0.1566\lib\xunit.dll

Original issue reported on code.google.com by nicolas....@gmail.com on 2 Jul 2012 at 4:31

GoogleCodeExporter commented 9 years ago
Hi Nicolas,

When using the =? operator, you do not need to enclose the assertion expression 
in quotations. The following, with <@ and @> omitted, should fail as expected:

[<Fact>]
let ``unquote - demo Unquote xUnit support`` () =
  ([3; 2; 1; 0] |> List.map ((+) 1)) =? [1 + 3..1 + 0]

Please let me know how it works out. Thanks for your report!

Stephen

Original comment by stephen....@gmail.com on 2 Jul 2012 at 4:48

GoogleCodeExporter commented 9 years ago
Closing this issue since we haven't heard back in some time and don't believe 
there is a bug.

Original comment by stephen....@gmail.com on 20 Jul 2012 at 11:48