Skip to content

Commit

Permalink
Remove Mains
Browse files Browse the repository at this point in the history
  • Loading branch information
markples committed Apr 5, 2023
1 parent 5f14f05 commit 0a886f8
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 69 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ namespace GitHub_21899
{
public class GitHub_21899
{

[Fact]
public static int Main()
public static int TestEntryPoint()
{
bool pass = true;
pass = test1() && test2() && test3() && test4();
Expand Down
2 changes: 0 additions & 2 deletions src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b02352/b02352.cs
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,6 @@ public virtual Boolean runTest()
}
}

public static int Main(String[] args) => Run(args.Length > 0 && args[0].Equals("-v"));

[Fact]
public static int TestEntryPoint() => Run(false);

Expand Down
31 changes: 2 additions & 29 deletions src/tests/JIT/Regression/CLR-x86-JIT/V1-M10/b08172/b08172.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,15 @@

public class Test
{
public static int Main(string[] args)
{
Test app = new Test();
app.Run(args);
return (100);
}

[Fact]
public static void TestEntryPoint() {
Test app = new Test();
app.Run(new string[0]);
app.Run(17);
}

[MethodImpl(MethodImplOptions.NoInlining)]
public int Run(string[] args)
public int Run(long i)
{
long i;

if (args.Length == 0)
{
i = 17;
}
else if (args.Length == 1)
{
i = Convert.ToInt64(args[0]);
}
else
{
usage();
return (1);
}
Console.Out.WriteLine("Factorial of " + i.ToString() + " is " + Fact(i).ToString());
return (0);
}
Expand All @@ -50,9 +28,4 @@ private long Fact(long i)
return (i);
return (i * Fact(i - 1L));
}

private void usage()
{
Console.Out.WriteLine("usage: Fact [number]");
}
}
18 changes: 0 additions & 18 deletions src/tests/JIT/Regression/CLR-x86-JIT/v2.1/DDB/b49778/b49778.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,24 +167,6 @@ static bool Bug(int which)
[Fact]
public static int TestEntryPoint() => Run(0);

static int Main(String[] args)
{
try
{
int val = 0;
if (args.Length > 0)
{
val = Int32.Parse(args[0]);
}
return Run(val);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return 666;
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
static int Run(int val)
{
Expand Down
18 changes: 0 additions & 18 deletions src/tests/JIT/Regression/CLR-x86-JIT/v2.1/b608066/b608066.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,24 +166,6 @@ static bool Bug(int which)
[Fact]
public static int TestEntryPoint() => Run(0);

static int Main(String[] args)
{
try
{
int val = 0;
if (args.Length > 0)
{
val = Int32.Parse(args[0]);
}
return Run(val);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
return 666;
}
}

[MethodImpl(MethodImplOptions.NoInlining)]
static int Run(int val)
{
Expand Down

0 comments on commit 0a886f8

Please sign in to comment.