Skip to content

Commit

Permalink
add sequencial to fail output
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLloyd committed Aug 26, 2024
1 parent de12a55 commit 2e187fb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions CsCheck/Check.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1973,10 +1973,11 @@ public static void SampleParallel<Actual, Model>(this Gen<(Actual, Model)> initi
{
if (spd == null) return "";
var sb = new StringBuilder();
sb.Append("\n Operations: ").Append(Print(spd.ParallelOperations.Select(i => i.Item1).ToList()));
sb.Append("\n On Threads: ").Append(Print(spd.ThreadIds));
sb.Append("\nInitial state: ").Append(printActual(initial.Generate(new PCG(spd.Stream, spd.Seed), null, out _).Item1));
sb.Append("\n Final state: ").Append(spd.Exception is not null ? spd.Exception.ToString() : printActual(spd.InitialActual));
sb.Append("\n Initial state: ").Append(printActual(initial.Generate(new PCG(spd.Stream, spd.Seed), null, out _).Item1));
sb.Append("\nSequencial Operations: ").Append(Print(spd.SequencialOperations.Select(i => i.Item1).ToList()));
sb.Append("\n Parallel Operations: ").Append(Print(spd.ParallelOperations.Select(i => i.Item1).ToList()));
sb.Append("\n On Threads: ").Append(Print(spd.ThreadIds));
sb.Append("\n Final state: ").Append(spd.Exception is not null ? spd.Exception.ToString() : printActual(spd.InitialActual));
var modelSequencialOperations = Array.ConvertAll(spd.SequencialOperations, i => (i.Item1, i.Item3));
var modelParallelOperations = Array.ConvertAll(spd.ParallelOperations, i => (i.Item1, i.Item3));
bool first = true;
Expand Down

0 comments on commit 2e187fb

Please sign in to comment.