From 9f0ebdae42c52b12b7bc1f9f49f2e232df6865a1 Mon Sep 17 00:00:00 2001
From: Andreas Dorfer <41114919+Andreas-Dorfer@users.noreply.github.com>
Date: Thu, 4 Apr 2024 18:43:04 +0200
Subject: [PATCH 01/16] FsCheck.3.0.0-rc3
---
src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj b/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
index 5304e80..0592bab 100644
--- a/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
+++ b/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
@@ -22,7 +22,7 @@
-
+
From 347c44d023e112bfdbaa4e0f200e58d0233143d4 Mon Sep 17 00:00:00 2001
From: Andreas Dorfer <41114919+Andreas-Dorfer@users.noreply.github.com>
Date: Mon, 22 Apr 2024 14:58:56 +0200
Subject: [PATCH 02/16] rc-1
---
src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj b/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
index 59cabc5..cfd126e 100644
--- a/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
+++ b/src/AD.FsCheck.MSTest/AD.FsCheck.MSTest.csproj
@@ -4,7 +4,7 @@
True
$(MSBuildProjectName.Replace("AD", "AndreasDorfer"))
False
- 1.1.2
+ 3.0.0-rc1
Andreas Dorfer
Integrates FsCheck with MSTest.
https://github.com/Andreas-Dorfer/fscheck-mstest
From 4af74c958189960a66eadb104681deeedd7d419d Mon Sep 17 00:00:00 2001
From: Andreas Dorfer <41114919+Andreas-Dorfer@users.noreply.github.com>
Date: Mon, 22 Apr 2024 15:18:52 +0200
Subject: [PATCH 03/16] no build errors
---
.../ConfigurationExtensions.cs | 28 ++++++++-----
src/AD.FsCheck.MSTest/MSTestRunner.cs | 5 ++-
.../PropertyAttribute.Invoke.cs | 1 +
.../PropertyAttribute.Invoke.tt | 1 +
src/AD.FsCheck.MSTest/PropertyAttribute.cs | 4 +-
.../RunConfigurationExtensions.cs | 40 +++++++++++--------
6 files changed, 47 insertions(+), 32 deletions(-)
diff --git a/src/AD.FsCheck.MSTest/ConfigurationExtensions.cs b/src/AD.FsCheck.MSTest/ConfigurationExtensions.cs
index a0c925f..60b1f02 100644
--- a/src/AD.FsCheck.MSTest/ConfigurationExtensions.cs
+++ b/src/AD.FsCheck.MSTest/ConfigurationExtensions.cs
@@ -1,30 +1,36 @@
-using static FsCheck.Random;
+using Microsoft.FSharp.Core;
namespace AD.FsCheck.MSTest;
///
-/// Extension methods for .
+/// Extension methods for .
///
public static class ConfigurationExtensions
{
- static string? FromStdGen(StdGen? stdGen)
+ static string? FromReplay(Replay? replay)
{
- if (stdGen is null) return null;
- return $"{stdGen.Item1},{stdGen.Item2}";
+ if (replay is null) return null;
+ var replayString = $"{replay.Rnd.Seed},{replay.Rnd.Gamma}";
+ var size = OptionModule.ToNullable(replay.Size);
+ if (size is not null)
+ {
+ replayString += $",{size.Value}";
+ }
+ return replayString;
}
///
- /// Converts a to a .
+ /// Converts a to a .
///
- /// The to convert.
+ /// The to convert.
/// The created .
- public static IRunConfiguration ToRunConfiguration(this Configuration configuration) =>
+ public static IRunConfiguration ToRunConfiguration(this Config configuration) =>
new RunConfiguration(
- configuration.MaxNbOfTest,
- configuration.MaxNbOfFailedTests,
+ configuration.MaxTest,
+ configuration.MaxRejected,
configuration.StartSize,
configuration.EndSize,
- FromStdGen(configuration.Replay),
+ FromReplay(OptionModule.ToObj(configuration.Replay)),
false, //Verbose cannot be inferred from a Configuration
configuration.QuietOnSuccess);
}
diff --git a/src/AD.FsCheck.MSTest/MSTestRunner.cs b/src/AD.FsCheck.MSTest/MSTestRunner.cs
index b4b8115..6a261de 100644
--- a/src/AD.FsCheck.MSTest/MSTestRunner.cs
+++ b/src/AD.FsCheck.MSTest/MSTestRunner.cs
@@ -34,12 +34,13 @@ public void OnShrink(FSharpList