-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReturnFunc not working for int64 properties #4
Comments
Also, using SetupByName produces a similar result (on this run, let mock2 = Mock<IFoo>().SetupByName("get_N").ReturnsFunc(fun () -> 7L).Create()
printfn "%d" mock2.N but not doing any setup produces the default value, let mock2 = Mock<IFoo>().Create()
printfn "%d" mock2.N |
Hi Mark and sorry for the excessively delayed response. Thanks for the bug report, unfortunately to this day I have been unable to repro your issue, it's returning 7 for me in all cases. If this is still an issue please provide more details, i.e. which version of Foq are you using, which version of the F# Compiler, FSharp.Core. Have you tried pulling the Foq source code directly from the site? |
I also tried dropping in the current version of Foq.fs from GitHub, but it made no difference. |
Sorry, still unable to reproduce your issue. I've added your reported issue as a test case all-the-same. |
For the record, the 1.7.2 version does fix the problem. Sorry it took me a while to check, but I'd added a (now-stale) copy of Foq.fs to my repro case. Removing that and updating to 1.7.2 fixed the problem. |
Visual F# 4.4, .net 4.5.2, Foq 1.7.1, debug build
Should write
Actually writes
The text was updated successfully, but these errors were encountered: