diff --git a/src/GalaxyCheck.Tests/PropertyTests/PurePropertyTests/AboutPresentation.cs b/src/GalaxyCheck.Tests/PropertyTests/PurePropertyTests/AboutPresentation.cs
deleted file mode 100644
index 9cbb3d1c..00000000
--- a/src/GalaxyCheck.Tests/PropertyTests/PurePropertyTests/AboutPresentation.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-using FluentAssertions;
-using GalaxyCheck;
-using System.Linq;
-using Xunit;
-
-namespace Tests.V2.PropertyTests.LinqInferenceTests
-{
- public class AboutPresentation
- {
- [Fact]
- public void ItPopulatesThePresentationalValueWithAScopedVariable()
- {
- var value = 0;
-
- var property =
- from a in Gen.Constant(value)
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(value);
- }
-
- [Fact]
- public void ItPopulatesThePresentationalValueWithTwoScopedVariables()
- {
- var value0 = 0;
- var value1 = 1;
-
- var property =
- from a in Gen.Constant(value0)
- from b in Gen.Constant(value1)
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new [] { value0, value1 });
- }
-
- [Fact]
- public void ItPopulatesThePresentationalValueWithThreeScopedVariables()
- {
- var value0 = 0;
- var value1 = 1;
- var value2 = 2;
-
- var property =
- from a in Gen.Constant(value0)
- from b in Gen.Constant(value1)
- from c in Gen.Constant(value2)
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new[] { value0, value1, value2 });
- }
-
- [Fact]
- public void ItPopulatesThePresentationalValueWithAScopedVariableAndIgnoresInnerSelect()
- {
- var value_ignored = 0;
- var value = 1;
-
- var property =
- from a in Gen.Constant(value_ignored).Select(_ => value)
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(value);
- }
-
- [Fact]
- public void ItPopulatesThePresentationalValueWithAScopedVariableAndIgnoresInnerSelectMany()
- {
- var value_ignored = 0;
- var value = 1;
-
- var property =
- from a in Gen.Constant(value_ignored).SelectMany(_ => Gen.Constant(value))
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(value);
- }
-
- [Fact]
- public void ItPopulatesThePresentationalValueWithAScopedVariableFromTheLetKeyword()
- {
- var value0 = 0;
- var value1 = 1;
-
- var property =
- from a in Gen.Constant(value0)
- let b = a
- let c = value1
- select Property.ForThese(() => false);
-
- var result = property.Check();
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new[] { value0, value0, value1 });
- }
-
- ///
- /// The LINQ inference works by unwrapping anonymous types, to reverse engineer what LINQ expressions do. This
- /// means if you explicitly return anonymous types inside a LINQ statement, those values will get erroneously
- /// unrolled. This is not ideal, but it's not possible (or really tricky + hacky) to disambiguate at the
- /// moment.
- ///
- public class AboutSuboptimalRendering
- {
- [Fact]
- public void ItAllowsAnonymousObjectsToBeExplicitlyReturnedBySelect()
- {
- // Ideally: { a = value }
- // Actual: [value]
-
- var value = 0;
-
- var property =
- from obj in Gen.Constant(value).Select(a => new { a })
- select Property.ForThese(() => false);
-
- var result = property.Check(seed: 0);
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new[] { value });
- }
-
- [Fact]
- public void ItAllowsAnonymousObjectsToBeExplicitlyReturnedBySelectMany()
- {
- // Ideally: { a = value }
- // Actual: [value]
-
- var value = 0;
-
- var property =
- from obj in Gen.Constant(value).SelectMany(a => Gen.Constant(new { a }))
- select Property.ForThese(() => false);
-
- var result = property.Check(seed: 0);
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new [] { value });
- }
-
- [Fact]
- public void ItAllowsAnonymousObjectsToBeExplicitlyReturnedBySelectManyWithProjection()
- {
- // Ideally: { a = value, b = value }
- // Actual: [value, value]
-
- var value = 0;
-
- var property =
- from obj in Gen.Constant(value).SelectMany(a => Gen.Constant(new { a }), (x, y) => new { x, y })
- select Property.ForThese(() => false);
-
- var result = property.Check(seed: 0);
-
- result.Counterexample!.PresentationalValue.Should().BeEquivalentTo(new[] { value, value });
- }
- }
- }
-}
diff --git a/src/GalaxyCheck.Tests/PropertyTests/ReflectedPropertyTests/AboutValidation.cs b/src/GalaxyCheck.Tests/PropertyTests/ReflectedPropertyTests/AboutValidation.cs
index a7e4c142..0ceacf7a 100644
--- a/src/GalaxyCheck.Tests/PropertyTests/ReflectedPropertyTests/AboutValidation.cs
+++ b/src/GalaxyCheck.Tests/PropertyTests/ReflectedPropertyTests/AboutValidation.cs
@@ -22,19 +22,17 @@ public void AMethodReturningAnUnsupportedTypeThrowsTheGenericUnsupportedExceptio
test.Should()
.Throw()
- .WithMessage($"Return type is not supported by Property.Reflect. Please use one of: GalaxyCheck.IGen`1[GalaxyCheck.Test], GalaxyCheck.Property, System.Boolean, System.Void. Return type was: {typeof(MyType)}.");
+ .WithMessage($"Return type is not supported by Property.Reflect. Please use one of: GalaxyCheck.Property, System.Boolean, System.Void. Return type was: {typeof(MyType)}.");
}
private Task TaskMethod() => null!;
private Task TaskBoolMethod() => null!;
private AsyncProperty AsyncPropertyMethod() => null!;
- private IGen IGenAsyncTestMethod() => null!;
[Theory]
[InlineData(nameof(TaskMethod))]
[InlineData(nameof(TaskBoolMethod))]
[InlineData(nameof(AsyncPropertyMethod))]
- [InlineData(nameof(IGenAsyncTestMethod))]
public void AMethodReturningAnUnsupportedTypeSupportedByAsyncThrowsTheMessageWithHint(string methodName)
{
var method = GetMethod(methodName);
@@ -43,7 +41,7 @@ public void AMethodReturningAnUnsupportedTypeSupportedByAsyncThrowsTheMessageWit
test.Should()
.Throw()
- .WithMessage($"Return type is not supported by Property.Reflect. Did you mean to use Property.ReflectAsync? Otherwise, please use one of: GalaxyCheck.IGen`1[GalaxyCheck.Test], GalaxyCheck.Property, System.Boolean, System.Void. Return type was: {method.ReturnType}.");
+ .WithMessage($"Return type is not supported by Property.Reflect. Did you mean to use Property.ReflectAsync? Otherwise, please use one of: GalaxyCheck.Property, System.Boolean, System.Void. Return type was: {method.ReturnType}.");
}
private static MethodInfo GetMethod(string name)
@@ -72,7 +70,7 @@ public void AMethodReturningAnUnsupportedTypeThrowsTheGenericUnsupportedExceptio
test.Should()
.Throw()
- .WithMessage($"Return type is not supported by Property.ReflectAsync. Please use one of: GalaxyCheck.AsyncProperty, GalaxyCheck.IGen`1[GalaxyCheck.AsyncTest], GalaxyCheck.IGen`1[GalaxyCheck.Test], GalaxyCheck.Property, System.Boolean, System.Threading.Tasks.Task, System.Threading.Tasks.Task`1[System.Boolean], System.Void. Return type was: {typeof(MyType)}.");
+ .WithMessage($"Return type is not supported by Property.ReflectAsync. Please use one of: GalaxyCheck.AsyncProperty, GalaxyCheck.Property, System.Boolean, System.Threading.Tasks.Task, System.Threading.Tasks.Task`1[System.Boolean], System.Void. Return type was: {typeof(MyType)}.");
}
}
}
diff --git a/src/GalaxyCheck.Tests/RendererTests/AboutUnaryExamples.cs b/src/GalaxyCheck.Tests/RendererTests/AboutUnaryExamples.cs
index 05581c3f..a871e687 100644
--- a/src/GalaxyCheck.Tests/RendererTests/AboutUnaryExamples.cs
+++ b/src/GalaxyCheck.Tests/RendererTests/AboutUnaryExamples.cs
@@ -42,7 +42,40 @@ public void ItCanHandleCircularReferences()
rendering.Should().Be("{ Self = }");
}
- public static TheoryData Values => new TheoryData
+ public static TheoryData TupleValues => new TheoryData
+ {
+ { new Tuple(1, 2, 3), new object[] { 1, 2, 3 } },
+ { (1, 2, 3), new object[] { 1, 2, 3 } },
+ { (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11), new object[] {1, 2, 3, 4, 5, 6, 7 } },
+ };
+
+ [Theory]
+ [MemberData(nameof(TupleValues))]
+ public void TuplesAreExpanded(object value, object[] expectedExpandedValues)
+ {
+ var rendering = ExampleRenderer.Render(new object[] { value }).ToList();
+
+ rendering.Should().HaveCount(expectedExpandedValues.Length);
+ }
+
+ public static TheoryData TupleValueRenders => new TheoryData
+ {
+ { new Tuple(1, 2, 3), "(Item1 = 1, Item2 = 2, Item3 = 3)" },
+ { (1, 2, 3), "(Item1 = 1, Item2 = 2, Item3 = 3)" },
+ { (1, 2, 3, 4, 5, 6, 7, 8), "(Item1 = 1, Item2 = 2, Item3 = 3, Item4 = 4, Item5 = 5, Item6 = 6, Item7 = 7, Rest = ...)" },
+ };
+
+ [Theory]
+ [MemberData(nameof(TupleValueRenders))]
+ public void TupleExamples(object value, string expectedRendering)
+ {
+ // Pass two params to force tuple not to be unwrapped
+ var rendering = ExampleRenderer.Render(new object[] { value, null! }).First().Substring("[0] = ".Length);
+
+ rendering.Should().Be(expectedRendering);
+ }
+
+ public static TheoryData OtherValueRenders => new TheoryData
{
{ null, "null" },
{ 1, "1" },
@@ -61,16 +94,13 @@ public void ItCanHandleCircularReferences()
{ new Func((_) => true), "System.Func`2[System.Int32,System.Boolean]" },
{ new Func>(() => (_) => true), "System.Func`1[System.Func`2[System.Int32,System.Boolean]]" },
{ new Action(() => { }), "System.Action" },
- { new Tuple(1, 2, 3), "(Item1 = 1, Item2 = 2, Item3 = 3)" },
- { (1, 2, 3), "(Item1 = 1, Item2 = 2, Item3 = 3)" },
- { (1, 2, 3, 4, 5, 6, 7, 8), "(Item1 = 1, Item2 = 2, Item3 = 3, Item4 = 4, Item5 = 5, Item6 = 6, Item7 = 7, Rest = ...)" },
{ Operations.Create, "Create" },
{ new FaultyRecord(), "" },
};
[Theory]
- [MemberData(nameof(Values))]
- public void Examples(object value, string expectedRendering)
+ [MemberData(nameof(OtherValueRenders))]
+ public void OtherExamples(object value, string expectedRendering)
{
var rendering = ExampleRenderer.Render(new object[] { value }).Single();
diff --git a/src/GalaxyCheck.Tests/RunnerTests/AssertTests/Snapshots.cs b/src/GalaxyCheck.Tests/RunnerTests/AssertTests/Snapshots.cs
index a0b72e3c..91dfab2a 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/AssertTests/Snapshots.cs
+++ b/src/GalaxyCheck.Tests/RunnerTests/AssertTests/Snapshots.cs
@@ -31,10 +31,11 @@ public void Snapshot_AssertFailure_IntLessThanEquals_BinaryProperty()
// TODO: Cross-platform consistent replay encoding
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
- var property =
+ var gen =
from x in Gen.Int32().LessThan(int.MaxValue)
from y in Gen.Int32().GreaterThan(x)
- select Property.ForThese(() => x < 1000);
+ select (x, y);
+ var property = gen.ForAll(input => input.x < 1000);
Action action = () => property.Assert(seed: 0);
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=1.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=1.snap
index a2872b02..aae0ff03 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=1.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=1.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
100
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=100.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=100.snap
index aa939a88..3189ad9a 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=100.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=100.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
50
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=2.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=2.snap
index 68874ca6..dcadaf17 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=2.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=2.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
100
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=50.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=50.snap
index e79587b8..9cfe35ef 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=50.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtLargerSizes_Iterations=50.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
51
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=100.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=100.snap
index 8e45d4c2..05678a5b 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=100.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=100.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
0
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=2.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=2.snap
index 8e45d4c2..05678a5b 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=2.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=2.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
0
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=50.snap b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=50.snap
index 8e45d4c2..05678a5b 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=50.snap
+++ b/src/GalaxyCheck.Tests/RunnerTests/CheckTests/__snapshots__/Snapshots.Falsifiable_AtSmallerSizes_Iterations=50.snap
@@ -20,7 +20,7 @@
"ReplayPath": [],
"Replay": "",
"Exception": null,
- "PresentationalValue": [
+ "PresentedInput": [
0
]
},
diff --git a/src/GalaxyCheck.Tests/RunnerTests/PrintTests/Snapshots.cs b/src/GalaxyCheck.Tests/RunnerTests/PrintTests/Snapshots.cs
index c63186ab..360a877d 100644
--- a/src/GalaxyCheck.Tests/RunnerTests/PrintTests/Snapshots.cs
+++ b/src/GalaxyCheck.Tests/RunnerTests/PrintTests/Snapshots.cs
@@ -77,10 +77,11 @@ public void PrintUnaryProperty()
[Fact]
public void PrintBinaryProperty()
{
- var property = new Property(
+ var gen =
from x in Gen.Int32().LessThan(int.MaxValue)
from y in Gen.Int32().GreaterThan(x)
- select Property.ForThese(() => false));
+ select (x, y);
+ var property = gen.ForAll((_) => false);
var print = PrintAndCollect(property);
@@ -100,10 +101,11 @@ public void PrintUnaryListProperty()
[Fact]
public void PrintBinaryListProperty()
{
- var property = new Property(
+ var gen =
from xs in Gen.Int32().ListOf()
from ys in Gen.Int32().ListOf().WithCountGreaterThan(xs.Count)
- select Property.ForThese(() => false));
+ select (xs, ys);
+ var property = gen.ForAll((_) => false);
var print = PrintAndCollect(property);
@@ -145,10 +147,11 @@ public async Task PrintUnaryProperty()
[Fact]
public async Task PrintBinaryProperty()
{
- var property = new AsyncProperty(
+ var gen =
from x in Gen.Int32().LessThan(int.MaxValue)
from y in Gen.Int32().GreaterThan(x)
- select Property.ForTheseAsync(() => Task.FromResult(false)));
+ select (x, y);
+ var property = gen.ForAllAsync((_) => Task.FromResult(false));
var print = await PrintAndCollect(property);
@@ -168,10 +171,11 @@ public async Task PrintUnaryListProperty()
[Fact]
public async Task PrintBinaryListProperty()
{
- var property = new AsyncProperty(
+ var gen =
from xs in Gen.Int32().ListOf()
from ys in Gen.Int32().ListOf().WithCountGreaterThan(xs.Count)
- select Property.ForTheseAsync(() => Task.FromResult(false)));
+ select (xs, ys);
+ var property = gen.ForAllAsync((_) => Task.FromResult(false));
var print = await PrintAndCollect(property);
diff --git a/src/GalaxyCheck.Xunit.Tests/IntegrationSample/AsyncTests.cs b/src/GalaxyCheck.Xunit.Tests/IntegrationSample/AsyncTests.cs
index cf4e2cbc..8406faef 100644
--- a/src/GalaxyCheck.Xunit.Tests/IntegrationSample/AsyncTests.cs
+++ b/src/GalaxyCheck.Xunit.Tests/IntegrationSample/AsyncTests.cs
@@ -18,25 +18,6 @@ public AsyncTests(ITestOutputHelper testOutputHelper)
_testOutputHelper = testOutputHelper;
}
- [Property]
- public IGen InfalliblePurePropertyAsync() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForTheseAsync(async () =>
- {
- await Task.Delay(1);
- AnnounceTestInvocation(nameof(InfalliblePurePropertyAsync));
- });
-
- [Property]
- public IGen FalliblePurePropertyAsync() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForTheseAsync(async () =>
- {
- await Task.Delay(1);
- AnnounceTestInvocation(nameof(FalliblePurePropertyAsync));
- throw new Exception("Failed!");
- });
-
[Property]
public async Task InfallibleVoidPropertyAsync([Between(0, 100)] int x)
{
@@ -112,14 +93,6 @@ public async Task PropertyWithGenFromMemberGenAsync([MemberGen(nameof(EvenInt32)
Assert.True(x % 2 != 1, "They are not odd!");
}
- [Sample]
- public IGen SamplePurePropertyAsync() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForTheseAsync(async () =>
- {
- await Task.Delay(1);
- });
-
[Sample]
public async Task SampleVoidPropertyAsync([Between(0, 100)] int x)
{
diff --git a/src/GalaxyCheck.Xunit.Tests/IntegrationSample/Tests.cs b/src/GalaxyCheck.Xunit.Tests/IntegrationSample/Tests.cs
index ce9a33cc..c322db04 100644
--- a/src/GalaxyCheck.Xunit.Tests/IntegrationSample/Tests.cs
+++ b/src/GalaxyCheck.Xunit.Tests/IntegrationSample/Tests.cs
@@ -17,23 +17,6 @@ public Tests(ITestOutputHelper testOutputHelper)
_testOutputHelper = testOutputHelper;
}
- [Property]
- public IGen InfalliblePureProperty() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForThese(() =>
- {
- AnnounceTestInvocation(nameof(InfalliblePureProperty));
- });
-
- [Property]
- public IGen FalliblePureProperty() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForThese(() =>
- {
- AnnounceTestInvocation(nameof(FalliblePureProperty));
- throw new Exception("Failed!");
- });
-
[Property]
public void InfallibleVoidProperty([Between(0, 100)] int x)
{
@@ -96,13 +79,6 @@ public void PropertyWithGenFromMemberGen([MemberGen(nameof(EvenInt32))] int x)
Assert.True(x % 2 != 1, "They are not odd!");
}
- [Sample]
- public IGen SamplePureProperty() =>
- from a in Gen.Int32().Between(0, 100)
- select Property.ForThese(() =>
- {
- });
-
[Sample]
public void SampleVoidProperty([Between(0, 100)] int x)
{
diff --git a/src/GalaxyCheck.Xunit.Tests/IntegrationTests.cs b/src/GalaxyCheck.Xunit.Tests/IntegrationTests.cs
index d1808d9f..786ce897 100644
--- a/src/GalaxyCheck.Xunit.Tests/IntegrationTests.cs
+++ b/src/GalaxyCheck.Xunit.Tests/IntegrationTests.cs
@@ -21,8 +21,6 @@ public IntegrationTests(TestSuiteFixture fixture)
}
[Theory]
- [InlineData("InfalliblePureProperty")]
- [InlineData("InfalliblePurePropertyAsync")]
[InlineData("InfallibleVoidProperty")]
[InlineData("InfallibleVoidPropertyAsync")]
[InlineData("InfallibleBooleanProperty")]
@@ -41,8 +39,6 @@ public void PassingProperties(string testName)
}
[Theory]
- [InlineData("FalliblePureProperty")]
- [InlineData("FalliblePurePropertyAsync")]
[InlineData("FallibleVoidProperty")]
[InlineData("FallibleVoidPropertyAsync")]
[InlineData("FallibleBooleanProperty")]
@@ -58,8 +54,6 @@ public void FailingProperties(string testName)
}
[Theory]
- [InlineData("SamplePureProperty")]
- [InlineData("SamplePurePropertyAsync")]
[InlineData("SampleVoidProperty")]
[InlineData("SampleVoidPropertyAsync")]
public void SampledProperties(string testName)
diff --git a/src/GalaxyCheck/Gens/Internal/Iterations/GenIterationFactory.cs b/src/GalaxyCheck/Gens/Internal/Iterations/GenIterationFactory.cs
index f2cf751d..97c70ac6 100644
--- a/src/GalaxyCheck/Gens/Internal/Iterations/GenIterationFactory.cs
+++ b/src/GalaxyCheck/Gens/Internal/Iterations/GenIterationFactory.cs
@@ -29,7 +29,7 @@ public GenIteration(
public IGenData Data { get; init; }
IGenData IGenIteration.Data => Data.Match(
- onInstance: instanceData => GenData.InstanceData(instanceData.ExampleSpace, instanceData.ExampleSpaceHistory),
+ onInstance: instanceData => GenData.InstanceData(instanceData.ExampleSpace),
onError: errorData => GenData.ErrorData(errorData.GenName, errorData.Message),
onDiscard: discardData => GenData.DiscardData(discardData.ExampleSpace));
@@ -53,8 +53,6 @@ public GenInstance(
public IExampleSpace ExampleSpace => Data.Instance!.ExampleSpace;
- public IEnumerable ExampleSpaceHistory => Data.Instance!.ExampleSpaceHistory;
-
IExampleSpace IGenInstanceData.ExampleSpace => ExampleSpace;
}
@@ -92,23 +90,7 @@ public static IGenIteration Instance(
GenParameters nextParameters,
IExampleSpace exampleSpace)
{
- var instanceData = GenData.InstanceData(
- exampleSpace,
- new[] { exampleSpace });
-
- return new GenIteration(replayParameters, nextParameters, instanceData);
- }
-
- public static IGenIteration Instance(
- GenParameters replayParameters,
- GenParameters nextParameters,
- IExampleSpace exampleSpace,
- IEnumerable lastExampleSpaceHistory)
- {
- var instanceData = GenData.InstanceData(
- exampleSpace,
- lastExampleSpaceHistory.Append(exampleSpace));
-
+ var instanceData = GenData.InstanceData(exampleSpace);
return new GenIteration(replayParameters, nextParameters, instanceData);
}
diff --git a/src/GalaxyCheck/Gens/Iterations/GenIteration.cs b/src/GalaxyCheck/Gens/Iterations/GenIteration.cs
index a827c0d9..b5c4c693 100644
--- a/src/GalaxyCheck/Gens/Iterations/GenIteration.cs
+++ b/src/GalaxyCheck/Gens/Iterations/GenIteration.cs
@@ -31,8 +31,6 @@ T Match(
public interface IGenInstanceData
{
IExampleSpace ExampleSpace { get; }
-
- IEnumerable ExampleSpaceHistory { get; }
}
public interface IGenErrorData
@@ -47,9 +45,7 @@ public interface IGenDiscardData
IExampleSpace ExampleSpace { get; }
}
- public record GenInstanceData(
- IExampleSpace ExampleSpace,
- IEnumerable ExampleSpaceHistory) : IGenInstanceData;
+ public record GenInstanceData(IExampleSpace ExampleSpace) : IGenInstanceData;
public record GenErrorData(string GenName, string Message) : IGenErrorData;
@@ -57,14 +53,12 @@ public record GenDiscardData(IExampleSpace ExampleSpace) : IGenDiscardData;
public record GenData : IGenData
{
- public static GenData InstanceData(
- IExampleSpace exampleSpace,
- IEnumerable exampleSpaceHistory) => new GenData
- {
- Instance = new GenInstanceData(exampleSpace, exampleSpaceHistory),
- Error = null,
- Discard = null
- };
+ public static GenData InstanceData(IExampleSpace exampleSpace) => new GenData
+ {
+ Instance = new GenInstanceData(exampleSpace),
+ Error = null,
+ Discard = null
+ };
public static GenData ErrorData(string genName, string message) => new GenData
{
diff --git a/src/GalaxyCheck/Gens/Iterations/Generic/GenIteration.cs b/src/GalaxyCheck/Gens/Iterations/Generic/GenIteration.cs
index b11cf072..bbd6e844 100644
--- a/src/GalaxyCheck/Gens/Iterations/Generic/GenIteration.cs
+++ b/src/GalaxyCheck/Gens/Iterations/Generic/GenIteration.cs
@@ -45,9 +45,7 @@ public interface IGenInstanceData : IGenInstanceData
new IExampleSpace ExampleSpace { get; }
}
- public record GenInstanceData(
- IExampleSpace ExampleSpace,
- IEnumerable ExampleSpaceHistory) : IGenInstanceData
+ public record GenInstanceData(IExampleSpace ExampleSpace) : IGenInstanceData
{
IExampleSpace IGenInstanceData.ExampleSpace => ExampleSpace;
}
@@ -58,14 +56,12 @@ public record GenDiscardData(IExampleSpace ExampleSpace) : IGenDiscardData;
public record GenData : IGenData
{
- public static GenData InstanceData(
- IExampleSpace exampleSpace,
- IEnumerable exampleSpaceHistory) => new GenData
- {
- Instance = new GenInstanceData(exampleSpace, exampleSpaceHistory),
- Error = null,
- Discard = null
- };
+ public static GenData InstanceData(IExampleSpace exampleSpace) => new GenData
+ {
+ Instance = new GenInstanceData(exampleSpace),
+ Error = null,
+ Discard = null
+ };
public static GenData ErrorData(string genName, string message) => new GenData
{
diff --git a/src/GalaxyCheck/Operators/Cast.cs b/src/GalaxyCheck/Operators/Cast.cs
index 5e51d1c2..58c8dbfc 100644
--- a/src/GalaxyCheck/Operators/Cast.cs
+++ b/src/GalaxyCheck/Operators/Cast.cs
@@ -14,8 +14,7 @@ public static partial class Extensions
onInstance: instance => GenIterationFactory.Instance(
iteration.ReplayParameters,
iteration.NextParameters,
- instance.ExampleSpace.Cast(),
- instance.ExampleSpaceHistory),
+ instance.ExampleSpace.Cast()),
onError: error => GenIterationFactory.Error(
iteration.ReplayParameters,
iteration.NextParameters,
diff --git a/src/GalaxyCheck/Operators/NoShrink.cs b/src/GalaxyCheck/Operators/NoShrink.cs
index 6af757f7..1d808c22 100644
--- a/src/GalaxyCheck/Operators/NoShrink.cs
+++ b/src/GalaxyCheck/Operators/NoShrink.cs
@@ -10,7 +10,6 @@ public static IGen NoShrink(this IGen gen) =>
gen.TransformInstances(instance => GenIterationFactory.Instance(
instance.ReplayParameters,
instance.NextParameters,
- ExampleSpaceFactory.Singleton(instance.ExampleSpace.Current.Id, instance.ExampleSpace.Current.Value),
- instance.ExampleSpaceHistory));
+ ExampleSpaceFactory.Singleton(instance.ExampleSpace.Current.Id, instance.ExampleSpace.Current.Value)));
}
}
diff --git a/src/GalaxyCheck/Operators/Select.cs b/src/GalaxyCheck/Operators/Select.cs
index 4b983247..2af01ef7 100644
--- a/src/GalaxyCheck/Operators/Select.cs
+++ b/src/GalaxyCheck/Operators/Select.cs
@@ -32,8 +32,7 @@ public static IGen Select(this IGen gen, Func> Run(
onInstance: innerInstance => GenIterationFactory.Instance(
iteration.ReplayParameters,
innerIteration.NextParameters,
- innerInstance.ExampleSpace,
- instance.ExampleSpaceHistory),
+ innerInstance.ExampleSpace),
onError: innerError => GenIterationFactory.Error(
iteration.ReplayParameters,
innerIteration.NextParameters,
diff --git a/src/GalaxyCheck/Operators/Unfold.cs b/src/GalaxyCheck/Operators/Unfold.cs
index 947c9f9f..4c5777e0 100644
--- a/src/GalaxyCheck/Operators/Unfold.cs
+++ b/src/GalaxyCheck/Operators/Unfold.cs
@@ -30,8 +30,7 @@ public static IGen Unfold(
return GenIterationFactory.Instance(
instance.ReplayParameters,
instance.NextParameters,
- unfolder(instance.ExampleSpace.Current.Value),
- instance.ExampleSpaceHistory);
+ unfolder(instance.ExampleSpace.Current.Value));
};
return gen.TransformInstances(transformation);
diff --git a/src/GalaxyCheck/Operators/Where.cs b/src/GalaxyCheck/Operators/Where.cs
index d64854d8..2319eb1c 100644
--- a/src/GalaxyCheck/Operators/Where.cs
+++ b/src/GalaxyCheck/Operators/Where.cs
@@ -33,8 +33,7 @@ public static IGen Where(this IGen gen, Func pred)
return GenIterationFactory.Instance(
instance.ReplayParameters,
instance.NextParameters,
- filteredExampleSpace,
- instance.ExampleSpaceHistory);
+ filteredExampleSpace);
};
GenStreamTransformation resizeAndTerminateAfterConsecutiveDiscards = (stream) =>
diff --git a/src/GalaxyCheck/Properties/ForThese.cs b/src/GalaxyCheck/Properties/ForThese.cs
deleted file mode 100644
index 01f16c1f..00000000
--- a/src/GalaxyCheck/Properties/ForThese.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using GalaxyCheck.Properties;
-using System;
-
-namespace GalaxyCheck
-{
- public partial class Property
- {
- public static Test ForThese(Func func) => TestFactory.Create(
- null!,
- () => func(),
- null);
-
- public static Test ForThese(Action func) => ForThese(func.AsTrueFunc());
- }
-}
diff --git a/src/GalaxyCheck/Properties/ForTheseAsync.cs b/src/GalaxyCheck/Properties/ForTheseAsync.cs
deleted file mode 100644
index 05560a2d..00000000
--- a/src/GalaxyCheck/Properties/ForTheseAsync.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using GalaxyCheck.Properties;
-using System;
-using System.Threading.Tasks;
-
-namespace GalaxyCheck
-{
- public partial class Property
- {
- public static AsyncTest ForTheseAsync(Func> func) => TestFactory.Create(
- null!,
- () => new ValueTask(func()),
- null);
-
- public static AsyncTest ForTheseAsync(Func func) => ForTheseAsync(func.AsTrueFunc());
- }
-}
diff --git a/src/GalaxyCheck/Properties/Reflect.cs b/src/GalaxyCheck/Properties/Reflect.cs
index 8a3ad947..075be1f8 100644
--- a/src/GalaxyCheck/Properties/Reflect.cs
+++ b/src/GalaxyCheck/Properties/Reflect.cs
@@ -92,7 +92,6 @@ private static AsyncReflectedPropertyHandler ToAsyncPropertyHandler(ReflectedPro
{ typeof(void), ToVoidProperty },
{ typeof(bool), ToBooleanProperty },
{ typeof(Property), ToReturnedProperty },
- { typeof(IGen), ToPureProperty },
}.ToImmutableDictionary();
private readonly static ImmutableDictionary AsyncMethodPropertyHandlers =
@@ -101,7 +100,6 @@ private static AsyncReflectedPropertyHandler ToAsyncPropertyHandler(ReflectedPro
{ typeof(Task), ToTaskProperty },
{ typeof(Task), ToTaskBooleanProperty },
{ typeof(AsyncProperty), ToReturnedAsyncProperty },
- { typeof(IGen), ToPureAsyncProperty },
}.ToImmutableDictionary();
private static ReflectedPropertyHandler ToVoidProperty => (methodInfo, target, genFactory, customGens) =>
@@ -155,18 +153,6 @@ private static AsyncReflectedPropertyHandler ToAsyncPropertyHandler(ReflectedPro
}
};
- private static ReflectedPropertyHandler ToPureProperty => (methodInfo, target, _, _) =>
- {
- try
- {
- return new Property((IGen)methodInfo.Invoke(target, new object[] { })!);
- }
- catch (TargetInvocationException ex)
- {
- throw ex.InnerException!;
- }
- };
-
private static AsyncReflectedPropertyHandler ToTaskProperty => (methodInfo, target, genFactory, customGens) =>
{
return new AsyncProperty(Gen
@@ -217,17 +203,5 @@ private static AsyncReflectedPropertyHandler ToAsyncPropertyHandler(ReflectedPro
throw ex.InnerException!;
}
};
-
- private static AsyncReflectedPropertyHandler ToPureAsyncProperty => (methodInfo, target, _, _) =>
- {
- try
- {
- return new AsyncProperty((IGen)methodInfo.Invoke(target, new object[] { })!);
- }
- catch (TargetInvocationException ex)
- {
- throw ex.InnerException!;
- }
- };
}
}
diff --git a/src/GalaxyCheck/Properties/Test.cs b/src/GalaxyCheck/Properties/Test.cs
index 5241bf63..889ee880 100644
--- a/src/GalaxyCheck/Properties/Test.cs
+++ b/src/GalaxyCheck/Properties/Test.cs
@@ -6,42 +6,46 @@
namespace GalaxyCheck
{
- public interface TestInput
- {
- TInput Input { get; }
+ public partial class Property
+ {
+ public interface TestInput
+ {
+ TInput Input { get; }
- Lazy Output { get; }
+ Lazy Output { get; }
- IReadOnlyList? PresentedInput { get; }
- }
+ IReadOnlyList PresentedInput { get; }
+ }
- public interface Test : TestInput
- {
- }
+ public interface Test : TestInput
+ {
+ }
- public interface Test : Test
- {
- }
+ public interface Test : Test
+ {
+ }
- public interface AsyncTest : TestInput>
- {
- }
+ public interface AsyncTest : TestInput>
+ {
+ }
- public interface AsyncTest : AsyncTest
- {
+ public interface AsyncTest : AsyncTest
+ {
+ }
}
public static partial class Extensions
{
- public static Test Cast(this Test test) => TestFactory.Create((T)test.Input!, test.Output, test.PresentedInput);
+ public static Property.Test Cast(this Property.Test test) => TestFactory.Create((T)test.Input!, test.Output, test.PresentedInput);
- public static AsyncTest Cast(this AsyncTest test) => TestFactory.Create((T)test.Input!, test.Output, test.PresentedInput);
+ public static Property.AsyncTest Cast(this Property.AsyncTest test) => TestFactory.Create((T)test.Input!, test.Output, test.PresentedInput);
- public static AsyncTest AsAsync(this Test test) => TestFactory.Create(
+ public static Property.AsyncTest AsAsync(this Property.Test test) => TestFactory.Create(
test.Input,
- new Lazy>(() => ValueTask.FromResult(test.Output.Value)),
+ new Lazy>(() => ValueTask.FromResult(test.Output.Value)),
test.PresentedInput);
}
}
+
#pragma warning disable IDE1006 // Naming Styles
diff --git a/src/GalaxyCheck/Properties/TestFactory.cs b/src/GalaxyCheck/Properties/TestFactory.cs
index 9d7640a8..5664d6a6 100644
--- a/src/GalaxyCheck/Properties/TestFactory.cs
+++ b/src/GalaxyCheck/Properties/TestFactory.cs
@@ -6,67 +6,67 @@ namespace GalaxyCheck.Properties
{
internal static class TestFactory
{
- private record TestOutputImpl(TestResult Result, Exception? Exception) : TestOutput;
+ private record TestOutputImpl(Property.TestResult Result, Exception? Exception) : Property.TestOutput;
- private record TestImpl(T Input, Lazy Output, IReadOnlyList? PresentedInput) : Test;
+ private record TestImpl(T Input, Lazy Output, IReadOnlyList PresentedInput) : Property.Test;
- private record TestImpl(object? Input, Lazy Output, IReadOnlyList? PresentedInput) : Test;
+ private record TestImpl(object? Input, Lazy Output, IReadOnlyList PresentedInput) : Property.Test;
- public static Test Create(T input, Lazy output, IReadOnlyList? presentedInput)
+ public static Property.Test Create(T input, Lazy output, IReadOnlyList presentedInput)
{
return new TestImpl(input, output, presentedInput);
}
- public static Test Create(T input, Func generateOutput, IReadOnlyList? presentedInput)
+ public static Property.Test Create(T input, Func generateOutput, IReadOnlyList presentedInput)
{
return new TestImpl(input, AnalyzeBooleanOutput(generateOutput), presentedInput);
}
- public static Test Create(object[] input, Func generateOutput, IReadOnlyList? presentedInput)
+ public static Property.Test Create(object[] input, Func generateOutput, IReadOnlyList presentedInput)
{
return new TestImpl(input, AnalyzeBooleanOutput(generateOutput), presentedInput);
}
- private static Lazy AnalyzeBooleanOutput(Func generateOutput) => new Lazy(() =>
+ private static Lazy AnalyzeBooleanOutput(Func generateOutput) => new Lazy(() =>
{
try
{
- return new TestOutputImpl(generateOutput() ? TestResult.Succeeded : TestResult.Failed, null);
+ return new TestOutputImpl(generateOutput() ? Property.TestResult.Succeeded : Property.TestResult.Failed, null);
}
catch (Exception ex)
{
- return new TestOutputImpl(TestResult.Failed, ex);
+ return new TestOutputImpl(Property.TestResult.Failed, ex);
}
});
- private record AsyncTestImpl(T Input, Lazy> Output, IReadOnlyList? PresentedInput) : AsyncTest;
+ private record AsyncTestImpl(T Input, Lazy> Output, IReadOnlyList PresentedInput) : Property.AsyncTest;
- private record AsyncTestImpl(object? Input, Lazy> Output, IReadOnlyList? PresentedInput) : AsyncTest;
+ private record AsyncTestImpl(object? Input, Lazy> Output, IReadOnlyList PresentedInput) : Property.AsyncTest;
- public static AsyncTest Create(T input, Lazy> output, IReadOnlyList? presentedInput)
+ public static Property.AsyncTest Create(T input, Lazy> output, IReadOnlyList presentedInput)
{
return new AsyncTestImpl(input, output, presentedInput);
}
- public static AsyncTest Create(T input, Func> generateOutput, IReadOnlyList? presentedInput)
+ public static Property.AsyncTest Create(T input, Func> generateOutput, IReadOnlyList presentedInput)
{
return new AsyncTestImpl(input, AnalyzeBooleanOutput(generateOutput), presentedInput);
}
- public static AsyncTest Create(object[] input, Func> generateOutput, IReadOnlyList? presentedInput)
+ public static Property.AsyncTest Create(object[] input, Func> generateOutput, IReadOnlyList presentedInput)
{
return new AsyncTestImpl(input, AnalyzeBooleanOutput(generateOutput), presentedInput);
}
- private static Lazy> AnalyzeBooleanOutput(Func> generateOutput) => new Lazy>(async () =>
+ private static Lazy> AnalyzeBooleanOutput(Func> generateOutput) => new Lazy>(async () =>
{
try
{
- return new TestOutputImpl(await generateOutput() ? TestResult.Succeeded : TestResult.Failed, null);
+ return new TestOutputImpl(await generateOutput() ? Property.TestResult.Succeeded : Property.TestResult.Failed, null);
}
catch (Exception ex)
{
- return new TestOutputImpl(TestResult.Failed, ex);
+ return new TestOutputImpl(Property.TestResult.Failed, ex);
}
}, isThreadSafe: false);
}
diff --git a/src/GalaxyCheck/Properties/TestOutput.cs b/src/GalaxyCheck/Properties/TestOutput.cs
index c7d911a7..351bbe35 100644
--- a/src/GalaxyCheck/Properties/TestOutput.cs
+++ b/src/GalaxyCheck/Properties/TestOutput.cs
@@ -2,12 +2,15 @@
namespace GalaxyCheck
{
+ public partial class Property
+ {
#pragma warning disable IDE1006 // Naming Styles
- public interface TestOutput
+ public interface TestOutput
#pragma warning restore IDE1006 // Naming Styles
- {
- TestResult Result { get; }
+ {
+ TestResult Result { get; }
- Exception? Exception { get; }
+ Exception? Exception { get; }
+ }
}
}
diff --git a/src/GalaxyCheck/Properties/TestResult.cs b/src/GalaxyCheck/Properties/TestResult.cs
index 745f026d..b8da57d6 100644
--- a/src/GalaxyCheck/Properties/TestResult.cs
+++ b/src/GalaxyCheck/Properties/TestResult.cs
@@ -1,8 +1,11 @@
namespace GalaxyCheck
{
- public enum TestResult
+ public partial class Property
{
- Succeeded = 1,
- Failed = 2
+ public enum TestResult
+ {
+ Succeeded = 1,
+ Failed = 2
+ }
}
}
diff --git a/src/GalaxyCheck/Property.cs b/src/GalaxyCheck/Property.cs
index 0399d303..2aeb55f2 100644
--- a/src/GalaxyCheck/Property.cs
+++ b/src/GalaxyCheck/Property.cs
@@ -13,16 +13,16 @@ public Property(IGen gen) : this(gen.Select(t => t.Cast()))
}
}
- public class Property : IGen>
+ public class Property : IGen>
{
- private readonly IGen> _gen;
+ private readonly IGen> _gen;
- public Property(IGen> gen)
+ public Property(IGen> gen)
{
_gen = gen;
}
- public IGenAdvanced> Advanced => _gen.Advanced;
+ public IGenAdvanced> Advanced => _gen.Advanced;
IGenAdvanced IGen.Advanced => Advanced;
@@ -33,25 +33,25 @@ from test in property
public class AsyncProperty : AsyncProperty
{
- public AsyncProperty(IGen> gen) : base(gen)
+ public AsyncProperty(IGen> gen) : base(gen)
{
}
- public AsyncProperty(IGen gen) : this(gen.Select(t => t.Cast()))
+ public AsyncProperty(IGen gen) : this(gen.Select(t => t.Cast()))
{
}
}
- public class AsyncProperty : IGen>
+ public class AsyncProperty : IGen>
{
- private readonly IGen> _gen;
+ private readonly IGen> _gen;
- public AsyncProperty(IGen> gen)
+ public AsyncProperty(IGen> gen)
{
_gen = gen;
}
- public IGenAdvanced> Advanced => _gen.Advanced;
+ public IGenAdvanced> Advanced => _gen.Advanced;
IGenAdvanced IGen.Advanced => Advanced;
diff --git a/src/GalaxyCheck/Runners/Assert.cs b/src/GalaxyCheck/Runners/Assert.cs
index 28aceac5..9e9bae6d 100644
--- a/src/GalaxyCheck/Runners/Assert.cs
+++ b/src/GalaxyCheck/Runners/Assert.cs
@@ -10,7 +10,7 @@ namespace GalaxyCheck
public static partial class Extensions
{
public static void Assert(
- this IGen> property,
+ this IGen> property,
int? iterations = null,
int? seed = null,
int? size = null,
@@ -25,7 +25,7 @@ public static void Assert(
}
public static async Task AssertAsync(
- this IGen> property,
+ this IGen> property,
int? iterations = null,
int? seed = null,
int? size = null,
@@ -66,7 +66,7 @@ private static void ThrowIfFalsified(
counterexample.ReplayPath,
counterexample.Replay,
counterexample.Exception,
- counterexample.PresentationalValue);
+ counterexample.PresentedInput);
}
}
}
@@ -151,7 +151,7 @@ private static string ReproductionLine(
private static string CounterexampleValueLine(Counterexample counterexample)
{
- var lines = ExampleRenderer.Render(counterexample.PresentationalValue).ToList();
+ var lines = ExampleRenderer.Render(counterexample.PresentedInput).ToList();
return lines.Count switch
{
diff --git a/src/GalaxyCheck/Runners/Check.cs b/src/GalaxyCheck/Runners/Check.cs
index c28ca543..a0065477 100644
--- a/src/GalaxyCheck/Runners/Check.cs
+++ b/src/GalaxyCheck/Runners/Check.cs
@@ -15,7 +15,7 @@ namespace GalaxyCheck
public static partial class Extensions
{
public static CheckResult Check(
- this IGen> property,
+ this IGen