Skip to content

Commit 8727c09

Browse files
Add regression tests for initialization of Java main args
1 parent abfd3a0 commit 8727c09

File tree

53 files changed

+350
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+350
-0
lines changed
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
public class Main
2+
{
3+
public static void main(String[] args)
4+
{
5+
if(args.length>0)
6+
assert(args[0] != null); // must hold
7+
}
8+
}
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Main.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
public class Main
2+
{
3+
public static void main(String[] args)
4+
{
5+
try {
6+
if(args.length>0)
7+
{
8+
String s = args[0];
9+
int i = s.length(); // must not fail
10+
}
11+
}
12+
catch(Exception e) {
13+
assert false; // unreachable
14+
}
15+
}
16+
}
17+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Main.class
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^VERIFICATION SUCCESSFUL$
7+
--
8+
^warning: ignoring
Binary file not shown.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
public class Main
2+
{
3+
public static void main(String[] args)
4+
{
5+
if(args.length>0)
6+
assert(args[0] == null); // must fail
7+
}
8+
}
9+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
Main.class
3+
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
--
8+
^warning: ignoring
Binary file not shown.

0 commit comments

Comments
 (0)