anchor.diff:  ///even though we do not want to expose them publically).
   [<System.ObsoleteAttribute>] //marking as obsolete is a workaround F# not honoring EditorBrowsable(EditorBrowsableState.Never) to hide intellisense discoverability, thanks to Tomas Petricek's answer on SO: http://stackoverflow.com/questions/6527141/is-it-possible-to-mark-a-module-function-as-hidden-from-intellisense-discovery/6527933#6527933
   module Internal =
  -    let private fsiTestFailed (expr:Expr) additionalInfo =
  +    let private fsiTestFailed (reducedExprs:Expr list) additionalInfo =
           nprintfn "\nTest failed:\n" 
           if additionalInfo |> String.IsNullOrWhiteSpace |> not then
                nprintfn "%s\n" additionalInfo
   
  -        for expr in expr |> reduceFully do
  -            printfn "%s" (expr |> decompile)
  +        for rd in reducedExprs do
  +            printfn "%s" (rd |> decompile)
           
           printfn ""
   
  
positive.code:                 | _ ->
                      fun msg -> raise <| AssertionFailedException("Test failed:" + msg)
  
              fun (expr:Expr) additionalInfo ->
                  let msg = 
                      nsprintf "\n%s\n%s\n"
                          (if additionalInfo |> String.IsNullOrWhiteSpace then "" else sprintf "\n%s\n" additionalInfo)
                          (expr |> reduceFully |> List.map decompile |> String.concat "\n")    
                  outputNonFsiTestFailedMsg msg
  
      type raisesResult<'a when 'a :> exn> =
          | NoException
          | WrongException of 'a
          | RightException
  
  open Internal
  
  
negative.code: ///2) framework fail methods if Xunit or Nunit present
  ///3) System.Exception if release mode.
  let inline test (expr:Expr<bool>) =
      let reducedExprs = expr |> reduceFully
      let lastExpr = reducedExprs |> List.rev |> List.head
      match lastExpr with
      | DerivedPatterns.Bool(true) -> ()
      | _ ->
          try
              testFailed reducedExprs ""
          with 
          | e -> raise e //we catch and raise e here to hide stack traces for clean test framework output
  
  ///Test wether the given expr fails with the given expected exception (or a subclass thereof).
  let inline raises<'a when 'a :> exn> (expr:Expr) = 
      let reducedExprs = expr |> reduceFully
      let lastExpr = reducedExprs |> List.rev |> List.head
      match lastExpr with
      | Patterns.Value(_,ty) when typeof<'a>.IsAssignableFrom(ty) -> ()
      | Patterns.Value(_,ty) when typeof<exn>.IsAssignableFrom(ty) ->
          try
              testFailed reducedExprs (sprintf "Expected %s but got %s" typeof<'a>.Name (ty.Name))
          with 
          | e -> raise e
      | _ ->
          try
              testFailed reducedExprs (sprintf "Expected %s but got nothing" typeof<'a>.Name)
          with 
          | e -> raise e
      
  let inline (=?) x y = test <@ x = y @>
  let inline (<?) x y = test <@ x < y @>
  let inline (>?) x y = test <@ x > y @>
  let inline (<=?) x y = test <@ x <= y @>
  let inline (>=?) x y = test <@ x >= y @>
  let inline (<>?) x y = test <@ x <> y @>