diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bdc341cf..21a2ea51 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +### 2.1.0 - March 7, 2016 +* Added support of `NUnit 3.2` +* Added pretty-print for F# value types - https://github.com/fsprojects/FsUnit/pull/89 + ### 2.0.0 - February 8, 2016 * Added support of `NUnit 3` - https://github.com/fsprojects/FsUnit/pull/83 * Dropped support of obsolete `not` operator diff --git a/build.fsx b/build.fsx index 3c0777bb..7b0b90e4 100644 --- a/build.fsx +++ b/build.fsx @@ -129,6 +129,7 @@ Target "NUnit" (fun _ -> !! "tests/**/bin/Release/*NUnit.Test.dll" |> NUnit3 (fun p -> { p with + Labels = LabelsLevel.All TimeOut = TimeSpan.FromMinutes 20.}) ) diff --git a/docs/content/NUnit.fsx b/docs/content/NUnit.fsx index 3bd080e8..2e395ab0 100644 --- a/docs/content/NUnit.fsx +++ b/docs/content/NUnit.fsx @@ -22,6 +22,18 @@ FsUnit for NUnit
+If you reference `FsUnit` from `NuGet` and want to use pretty-printed F# value types in error messages, +you have to add following piece of code to your assembly: + +*) + +open FsUnit + +type InitMsgUtils() = + inherit FSharpCustomMessageFormatter() + +(** + Euler - Problem 1 ----------------- *) diff --git a/paket.dependencies b/paket.dependencies index 6c8669a2..28115458 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -9,7 +9,7 @@ nuget SourceLink.Fake nuget FSharp.Core 3.1.2.5 nuget Microsoft.VisualStudio.QualityTools.UnitTestFramework -nuget NHamcrest 1.2.1 +nuget NHamcrest nuget xunit nuget xunit.runner.console nuget xunit.runner.visualstudio diff --git a/paket.lock b/paket.lock index b6086376..330b1fc2 100644 --- a/paket.lock +++ b/paket.lock @@ -1,14 +1,14 @@ NUGET remote: https://www.nuget.org/api/v2 specs: - FAKE (4.17.1) - FSharp.Compiler.Service (1.4.2.3) + FAKE (4.21.4) + FSharp.Compiler.Service (2.0.0.6) FSharp.Core (3.1.2.5) - FSharp.Formatting (2.13.5) - FSharp.Compiler.Service (>= 1.4.2 < 1.5.0) - FSharpVSPowerTools.Core (>= 2.2.0 < 2.3.0) - FSharpVSPowerTools.Core (2.2.0) - FSharp.Compiler.Service (>= 1.4.2.0) + FSharp.Formatting (2.14.0) + FSharp.Compiler.Service (>= 2.0.0.3 < 2.1.0) + FSharpVSPowerTools.Core (>= 2.3.0 < 2.4.0) + FSharpVSPowerTools.Core (2.3.0) + FSharp.Compiler.Service (>= 2.0.0.3) mbunit (3.4.14) Microsoft.Bcl (1.1.10) Microsoft.Bcl.Build (>= 1.0.14) @@ -18,9 +18,19 @@ NUGET Microsoft.Bcl.Build (>= 1.0.14) Microsoft.VisualStudio.QualityTools.UnitTestFramework (11.0.50727.1) NHamcrest (1.2.1) - NUnit (3.0.1) - NUnit.Console (3.0.1) - Octokit (0.17.0) + NUnit (3.2.0) + NUnit.Console (3.2.0) + NUnit.ConsoleRunner (3.2.0) + NUnit.Extension.NUnitProjectLoader (3.2.0) + NUnit.Extension.NUnitV2Driver (3.2.0) + NUnit.Extension.NUnitV2ResultWriter (3.2.0) + NUnit.Extension.VSProjectLoader (3.2.0) + NUnit.ConsoleRunner (3.2.0) + NUnit.Extension.NUnitProjectLoader (3.2.0) + NUnit.Extension.NUnitV2Driver (3.2.0) + NUnit.Extension.NUnitV2ResultWriter (3.2.0) + NUnit.Extension.VSProjectLoader (3.2.0) + Octokit (0.18.0) Microsoft.Net.Http SourceLink.Fake (1.1.0) System.Collections (4.0.10) - framework: dnxcore50 @@ -191,5 +201,5 @@ NUGET GITHUB remote: fsharp/FAKE specs: - modules/Octokit/Octokit.fsx (e537d90b050d02cc287cb64e18b72a8b7e984805) + modules/Octokit/Octokit.fsx (e71048b08b7aefebb3adeaa4518915510d55785c) Octokit \ No newline at end of file diff --git a/src/FsUnit.MbUnit/FsUnit.MbUnit.fsproj b/src/FsUnit.MbUnit/FsUnit.MbUnit.fsproj index f1cd200e..ba26c500 100644 --- a/src/FsUnit.MbUnit/FsUnit.MbUnit.fsproj +++ b/src/FsUnit.MbUnit/FsUnit.MbUnit.fsproj @@ -82,7 +82,7 @@ ..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll - False + True True diff --git a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj index 4d2046bc..cf066805 100644 --- a/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj +++ b/src/FsUnit.MsTestUnit/FsUnit.MsTest.fsproj @@ -92,7 +92,7 @@ ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll - False + True True diff --git a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj index dca1b6ac..90a67592 100644 --- a/src/FsUnit.NUnit/FsUnit.NUnit.fsproj +++ b/src/FsUnit.NUnit/FsUnit.NUnit.fsproj @@ -91,7 +91,7 @@ ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll - False + True True diff --git a/src/FsUnit.NUnit/FsUnit.fs b/src/FsUnit.NUnit/FsUnit.fs index 69bc30f4..f8c07ce9 100644 --- a/src/FsUnit.NUnit/FsUnit.fs +++ b/src/FsUnit.NUnit/FsUnit.fs @@ -9,6 +9,12 @@ open NUnit.Framework.Constraints // [] module TopLevelOperators = + + [] + type FSharpCustomMessageFormatter() = + do TestContext.AddFormatter( + ValueFormatterFactory(fun _ -> ValueFormatter(sprintf "%A"))) + let Null = NullConstraint() let Empty = EmptyConstraint() diff --git a/src/FsUnit.NUnit/paket.template b/src/FsUnit.NUnit/paket.template index f1dbe126..64c77872 100644 --- a/src/FsUnit.NUnit/paket.template +++ b/src/FsUnit.NUnit/paket.template @@ -22,7 +22,7 @@ summary description FsUnit is a set of extensions that add special testing syntax to NUnit. dependencies - NUnit 3.0.1 + NUnit 3.2.0 FSharp.Core >= 3.1.2.5 files ../../bin/FsUnit.NUnit/FsUnit.* ==> lib/net45 diff --git a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj index ddf451b7..b683892b 100644 --- a/src/FsUnit.Xunit/FsUnit.Xunit.fsproj +++ b/src/FsUnit.Xunit/FsUnit.Xunit.fsproj @@ -1,5 +1,6 @@  + Debug AnyCPU @@ -89,7 +90,7 @@ ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll - False + True True @@ -280,5 +281,4 @@ - \ No newline at end of file diff --git a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj index a60b663d..03eacba3 100644 --- a/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj +++ b/tests/FsUnit.NUnit.Test/FsUnit.NUnit.Test.fsproj @@ -50,6 +50,7 @@ + diff --git a/tests/FsUnit.NUnit.Test/init.fs b/tests/FsUnit.NUnit.Test/init.fs new file mode 100644 index 00000000..b87237fd --- /dev/null +++ b/tests/FsUnit.NUnit.Test/init.fs @@ -0,0 +1,7 @@ +namespace FsUnit.Test + +open FsUnit + +type InitMsgUtils() = + inherit FSharpCustomMessageFormatter() + diff --git a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj index 070627a5..ccd7c675 100644 --- a/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj +++ b/tests/FsUnit.Xunit.Test/FsUnit.Xunit.Test.fsproj @@ -1,5 +1,7 @@  + + Debug AnyCPU @@ -331,7 +333,5 @@ - - \ No newline at end of file