File tree Expand file tree Collapse file tree 5 files changed +3
-69
lines changed
HardwareIntrinsics/X86/Regression/GitHub_21899 Expand file tree Collapse file tree 5 files changed +3
-69
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ namespace GitHub_21899
8
8
{
9
9
public class GitHub_21899
10
10
{
11
-
12
11
[ Fact ]
13
- public static int Main ( )
12
+ public static int TestEntryPoint ( )
14
13
{
15
14
bool pass = true ;
16
15
pass = test1 ( ) && test2 ( ) && test3 ( ) && test4 ( ) ;
Original file line number Diff line number Diff line change @@ -930,8 +930,6 @@ public virtual Boolean runTest()
930
930
}
931
931
}
932
932
933
- public static int Main ( String [ ] args ) => Run ( args . Length > 0 && args [ 0 ] . Equals ( "-v" ) ) ;
934
-
935
933
[ Fact ]
936
934
public static int TestEntryPoint ( ) => Run ( false ) ;
937
935
Original file line number Diff line number Diff line change 9
9
10
10
public class Test
11
11
{
12
- public static int Main ( string [ ] args )
13
- {
14
- Test app = new Test ( ) ;
15
- app . Run ( args ) ;
16
- return ( 100 ) ;
17
- }
18
-
19
12
[ Fact ]
20
13
public static void TestEntryPoint ( ) {
21
14
Test app = new Test ( ) ;
22
- app . Run ( new string [ 0 ] ) ;
15
+ app . Run ( 17 ) ;
23
16
}
24
17
25
18
[ MethodImpl ( MethodImplOptions . NoInlining ) ]
26
- public int Run ( string [ ] args )
19
+ public int Run ( long i )
27
20
{
28
- long i ;
29
-
30
- if ( args . Length == 0 )
31
- {
32
- i = 17 ;
33
- }
34
- else if ( args . Length == 1 )
35
- {
36
- i = Convert . ToInt64 ( args [ 0 ] ) ;
37
- }
38
- else
39
- {
40
- usage ( ) ;
41
- return ( 1 ) ;
42
- }
43
21
Console . Out . WriteLine ( "Factorial of " + i . ToString ( ) + " is " + Fact ( i ) . ToString ( ) ) ;
44
22
return ( 0 ) ;
45
23
}
@@ -50,9 +28,4 @@ private long Fact(long i)
50
28
return ( i ) ;
51
29
return ( i * Fact ( i - 1L ) ) ;
52
30
}
53
-
54
- private void usage ( )
55
- {
56
- Console . Out . WriteLine ( "usage: Fact [number]" ) ;
57
- }
58
31
}
Original file line number Diff line number Diff line change @@ -167,24 +167,6 @@ static bool Bug(int which)
167
167
[ Fact ]
168
168
public static int TestEntryPoint ( ) => Run ( 0 ) ;
169
169
170
- static int Main ( String [ ] args )
171
- {
172
- try
173
- {
174
- int val = 0 ;
175
- if ( args . Length > 0 )
176
- {
177
- val = Int32 . Parse ( args [ 0 ] ) ;
178
- }
179
- return Run ( val ) ;
180
- }
181
- catch ( Exception e )
182
- {
183
- Console . WriteLine ( e . Message ) ;
184
- return 666 ;
185
- }
186
- }
187
-
188
170
[ MethodImpl ( MethodImplOptions . NoInlining ) ]
189
171
static int Run ( int val )
190
172
{
Original file line number Diff line number Diff line change @@ -166,24 +166,6 @@ static bool Bug(int which)
166
166
[ Fact ]
167
167
public static int TestEntryPoint ( ) => Run ( 0 ) ;
168
168
169
- static int Main ( String [ ] args )
170
- {
171
- try
172
- {
173
- int val = 0 ;
174
- if ( args . Length > 0 )
175
- {
176
- val = Int32 . Parse ( args [ 0 ] ) ;
177
- }
178
- return Run ( val ) ;
179
- }
180
- catch ( Exception e )
181
- {
182
- Console . WriteLine ( e . Message ) ;
183
- return 666 ;
184
- }
185
- }
186
-
187
169
[ MethodImpl ( MethodImplOptions . NoInlining ) ]
188
170
static int Run ( int val )
189
171
{
You can’t perform that action at this time.
0 commit comments