Skip to content
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

NUnit fails on F# project with FsCheck #731

Closed
sideeffffect opened this issue Jul 13, 2015 · 1 comment
Closed

NUnit fails on F# project with FsCheck #731

sideeffffect opened this issue Jul 13, 2015 · 1 comment

Comments

@sideeffffect
Copy link

I have a trivial project started from ProjectScaffold.
I have a test file tests/FSharpHello.Tests/Tests.fs like this:

module FSharpHello.Tests

open FSharpHello
open NUnit.Framework
open FsUnit
open FsCheck.NUnit

[<Test>]
let ``hello returns 42`` () =
  Library.hello 42 |> should equal 42

[<Property>]
let ``hello always returns 42``(x:int) =
  Library.hello x = 42

on ./build.sh I get this error:

mono  /home/ondra/Projects/FSharpHello/packages/NUnit.Runners/tools/nunit-console.exe "-nologo" "-noshadow" "-labels" "/home/ondra/Projects/FSharpHello/tests/FSharpHello.Tests/bin/Release/FSharpHello.Tests.dll" "-xml:TestResults.xml" 
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
ProcessModel: Default    DomainUsage: Single
Execution Runtime: mono-4.0
***** FSharpHello.Tests.hello always returns 42
***** FSharpHello.Tests.hello returns 42

Tests run: 1, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.0393985 seconds
  Not run: 1, Invalid: 1, Ignored: 0, Skipped: 0

Errors and Failures:

Tests Not Run:
1) NotRunnable : FSharpHello.Tests.hello always returns 42
   Test method has non-void return type, but no result is expected

Running build failed.
Error:
Fake.UnitTestCommon+FailedTestsException: NUnit test failed (1).
  at Fake.NUnitSequential.NUnit (Microsoft.FSharp.Core.FSharpFunc`2 setParams, IEnumerable`1 assemblies) [0x00000] in <filename unknown>:0 
  at FSI_0001.Build+clo@137-11.Invoke (Microsoft.FSharp.Core.Unit _arg7) [0x00000] in <filename unknown>:0 
  at Fake.TargetHelper+targetFromTemplate@155[Microsoft.FSharp.Core.Unit].Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00000] in <filename unknown>:0 
  at Fake.TargetHelper.runSingleTarget (Fake.TargetTemplate`1 target) [0x00000] in <filename unknown>:0 

when build or run tests in MonoDevelop, hello returns 42 runs OK, but hello always returns 42 doesn't run because of this error

Test method has non-void return type, but no result is expected

without hello always returns 42 everything is ok.

I've also reported this problem at FAKE.


link to the project and failing travis build

@rprouse
Copy link
Member

rprouse commented May 18, 2017

I am closing this because it has been inactive for so long. If anyone has further info, we can reopen.

@rprouse rprouse closed this as completed May 18, 2017
@rprouse rprouse added this to the Closed Without Action milestone May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants