mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-06-28 22:35:51 +00:00
StackTrace2.java: Rewrite to prevent spurious failure when some methods are inlined.
2008-08-07 Andrew Haley <aph@redhat.com> * testsuite/libjava.lang/StackTrace2.java: Rewrite to prevent spurious failure when some methods are inlined. From-SVN: r138840
This commit is contained in:
committed by
Andrew Haley
parent
b53b23dcfd
commit
7a4ef3104c
@@ -7,7 +7,7 @@ public class StackTrace2
|
||||
{
|
||||
try
|
||||
{
|
||||
a();
|
||||
new StackTrace2().a();
|
||||
}
|
||||
catch (Exception x)
|
||||
{
|
||||
@@ -16,14 +16,14 @@ public class StackTrace2
|
||||
}
|
||||
}
|
||||
|
||||
static void a()
|
||||
void a()
|
||||
{
|
||||
new Inner();
|
||||
new Inner().foo();
|
||||
}
|
||||
|
||||
static class Inner
|
||||
class Inner
|
||||
{
|
||||
public Inner()
|
||||
public void foo()
|
||||
{
|
||||
doCrash(null);
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class StackTrace2
|
||||
{
|
||||
System.out.println("Trace length = " + trace.length);
|
||||
checkLine(trace[0], "StackTrace2$Inner", "doCrash", 33);
|
||||
checkLine(trace[1], "StackTrace2$Inner", "<init>", 28);
|
||||
checkLine(trace[1], "StackTrace2$Inner", "foo", 28);
|
||||
checkLine(trace[2], "StackTrace2", "a", 21);
|
||||
checkLine(trace[3], "StackTrace2", "main", 10);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user