Skip to content

Commit

Permalink
Fix the polyrec.cs test based on PR feedback
Browse files Browse the repository at this point in the history
Based on PR feedback and Jeremy's check-in of the Roslyn
generator test logic I can now fully update the test so that it
no longer contains the Main method and it just implements
the [Fact]-marked test entrypoint.

Thanks

Tomas
  • Loading branch information
trylek committed Nov 21, 2021
1 parent b16344c commit 1a558ef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/tests/Loader/regressions/polyrec/polyrec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// and niters it the number of type/method instantiations to create each thread
using System;
using System.Threading;
using Xunit;

// Spice things up a bit with some mutual recursion between instantiations
class C<T>
Expand Down Expand Up @@ -63,7 +64,7 @@ public static void Start2()
genmeth2<string>(ninsts);
}

public static int Test(int threads, int insts)
public static void Test(int threads, int insts)
{
nthreads = threads;
ninsts = insts;
Expand All @@ -74,13 +75,13 @@ public static int Test(int threads, int insts)
t.Name = "Thread " + i;
t.Start();
}

Console.WriteLine("Main thread exited");
return 100;
}

public static int Main()

[Fact]
public static void Test_4_50()
{
return Test(4, 50);
Test(4, 50);
}
}

0 comments on commit 1a558ef

Please sign in to comment.