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

Short-circuiting rules should be honored during reduction steps #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This applies to IfThenElse expressions which encompass AndAlso and OrElse 
derived patterns.

For example, instead of

> <@ if 3 + 2 = 5 then "hello" + "world" else "goodbye" + "world" @> |> 
unquote;;

if 3 + 2 = 5 then "hello" + "world" else "goodbye" + "world"
if 5 = 5 then "helloworld" else "goodbyeworld"
if true then "helloworld" else "goodbyeworld"
"helloworld"

We should have

> <@ if 3 + 2 = 5 then "hello" + "world" else "goodbye" + "world" @> |> 
unquote;;

if 3 + 2 = 5 then "hello" + "world" else "goodbye" + "world"
if 5 = 5 then "helloworld" else "goodbye" + "world"
if true then "helloworld" else "goodbye" + "world"
"helloworld"

Original issue reported on code.google.com by stephen....@gmail.com on 30 Jun 2011 at 7:52

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 4 Jul 2011 at 2:15

GoogleCodeExporter commented 9 years ago

Original comment by stephen....@gmail.com on 7 Jul 2011 at 3:39