1

Upon running with xUnit the simplest test from FsCheck

open FsCheck

[<Property>]
let revRevIsOrig (xs:list<int>) = 
        List.rev(List.rev xs) = xs

I receive the exception

---- System.InvalidCastException : Unable to cast object of type 'FsList@303[System.Int32]' 
to type 'FsCheck.Arbitrary`1[Microsoft.FSharp.Collections.FSharpList`1[System.Int32]]'.

I tried to catch the exception and debug, but occurs before Would anyone have any clue on how to solve this ?

Way to reproduce:

  • make a new project
  • install FsCheck.xUnit NUget
  • put that code into the fs file
  • run the tests
nicolas
  • 9,549
  • 3
  • 39
  • 83

0 Answers0