提交 ee6c30c9 编写于 作者: S sla

8036132: Tab characters in test/com/sun/jdi files

Reviewed-by: alanb, mikael
上级 3d4e8b49
...@@ -35,44 +35,44 @@ createJavaFile() ...@@ -35,44 +35,44 @@ createJavaFile()
cat <<EOF > $classname.java.1 cat <<EOF > $classname.java.1
public class $classname { public class $classname {
public void bark(int i) { public void bark(int i) {
System.out.println(" bark: " + i); System.out.println(" bark: " + i);
switch (i) { switch (i) {
case 0: case 0:
throw new IllegalArgumentException("IllegalArgumentException"); throw new IllegalArgumentException("IllegalArgumentException");
case 1: case 1:
throw new ArithmeticException("ArithmeticException"); throw new ArithmeticException("ArithmeticException");
case 2: case 2:
throw new IllegalMonitorStateException("IllegalMonitorStateException"); throw new IllegalMonitorStateException("IllegalMonitorStateException");
case 3: case 3:
throw new IndexOutOfBoundsException("IndexOutOfBoundsException"); throw new IndexOutOfBoundsException("IndexOutOfBoundsException");
default: default:
throw new Error("should not happen"); throw new Error("should not happen");
} }
} }
public void loop(int max) { public void loop(int max) {
for (int i = 0; i <= max; i++) { for (int i = 0; i <= max; i++) {
try { try {
bark(i); bark(i);
} catch(RuntimeException re) { } catch(RuntimeException re) {
System.out.println(" loop: " + re.getMessage() + System.out.println(" loop: " + re.getMessage() +
" caught and ignored."); " caught and ignored.");
} }
} }
} }
public void partOne() { public void partOne() {
loop(2); loop(2);
System.out.println("partOne completed"); System.out.println("partOne completed");
} }
public void partTwo() { public void partTwo() {
loop(3); loop(3);
System.out.println("partTwo completed"); System.out.println("partTwo completed");
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Howdy!"); System.out.println("Howdy!");
$classname my = new $classname(); $classname my = new $classname();
my.partOne(); my.partOne();
my.partTwo(); my.partTwo();
System.out.println("Goodbye from $classname!"); System.out.println("Goodbye from $classname!");
} }
} }
EOF EOF
......
...@@ -39,12 +39,12 @@ createJavaFile() ...@@ -39,12 +39,12 @@ createJavaFile()
public class GetLocalVariables4Targ { public class GetLocalVariables4Targ {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("Howdy!"); System.out.println("Howdy!");
int i = 0; int i = 0;
try { try {
i = 16 / i; i = 16 / i;
} catch(Exception e) { } catch(Exception e) {
System.out.println("e should be visible"); // @1 breakpoint System.out.println("e should be visible"); // @1 breakpoint
} }
System.out.println("Goodbye from GetLocalVariables4Targ!"); System.out.println("Goodbye from GetLocalVariables4Targ!");
} }
} }
......
...@@ -219,7 +219,7 @@ if [ ! -r c:/ ] ; then ...@@ -219,7 +219,7 @@ if [ ! -r c:/ ] ; then
echo "Unable to make file unreadable, so test will fail. chmod: $HOME/jdb.ini" echo "Unable to make file unreadable, so test will fail. chmod: $HOME/jdb.ini"
if grep -q "uid=0" $HOME/jdb.ini ; then if grep -q "uid=0" $HOME/jdb.ini ; then
echo "The test is running as root. Fix infrastructure!" echo "The test is running as root. Fix infrastructure!"
fi fi
fi fi
doit doit
failIfNot 1 "open: $HOME/jdb.ini" failIfNot 1 "open: $HOME/jdb.ini"
......
...@@ -40,10 +40,10 @@ public class badscope { ...@@ -40,10 +40,10 @@ public class badscope {
public static final void main(String args[]) { public static final void main(String args[]) {
try { try {
System.out.println("hi!"); // @1 breakpoint System.out.println("hi!"); // @1 breakpoint
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} finally { } finally {
System.out.println("done"); System.out.println("done");
} }
} }
} }
...@@ -54,11 +54,11 @@ EOF ...@@ -54,11 +54,11 @@ EOF
dojdbCmds() dojdbCmds()
{ {
#set -x #set -x
cmd stop at badscope:4 ; $sleepcmd cmd stop at badscope:4 ; $sleepcmd
runToBkpt ; $sleepcmd runToBkpt ; $sleepcmd
cmd next ; $sleepcmd cmd next ; $sleepcmd
cmd next ; $sleepcmd cmd next ; $sleepcmd
cmd locals ; $sleepcmd cmd locals ; $sleepcmd
cmd cont cmd cont
} }
...@@ -71,7 +71,7 @@ mysetup() ...@@ -71,7 +71,7 @@ mysetup()
for ii in . $TESTSRC $TESTSRC/.. ; do for ii in . $TESTSRC $TESTSRC/.. ; do
if [ -r "$ii/ShellScaffold.sh" ] ; then if [ -r "$ii/ShellScaffold.sh" ] ; then
. $ii/ShellScaffold.sh . $ii/ShellScaffold.sh
break break
fi fi
done done
......
...@@ -67,9 +67,9 @@ if [ -z "${TESTJAVA}" ] ; then ...@@ -67,9 +67,9 @@ if [ -z "${TESTJAVA}" ] ; then
# is given on the command line, tell the user that and use a default. # is given on the command line, tell the user that and use a default.
# THIS IS THE JDK BEING TESTED. # THIS IS THE JDK BEING TESTED.
if [ -n "$1" ] ; then if [ -n "$1" ] ; then
TESTJAVA=$1 TESTJAVA=$1
else else
TESTJAVA=$JAVA_HOME TESTJAVA=$JAVA_HOME
fi fi
TESTSRC=. TESTSRC=.
TESTCLASSES=. TESTCLASSES=.
......
...@@ -42,15 +42,15 @@ createJavaFile() ...@@ -42,15 +42,15 @@ createJavaFile()
public final class $1 { public final class $1 {
public int m1(int i) { public int m1(int i) {
// @1 uncomment System.out.println("I'm here"); // @1 uncomment System.out.println("I'm here");
return m2(i, 1000); return m2(i, 1000);
} }
public int m2(int i, int j) { public int m2(int i, int j) {
if (i < 0 || j < 0) { // @1 breakpoint if (i < 0 || j < 0) { // @1 breakpoint
throw new IllegalArgumentException(); throw new IllegalArgumentException();
} }
return i+j; return i+j;
} }
$1() { $1() {
...@@ -59,7 +59,7 @@ public final class $1 { ...@@ -59,7 +59,7 @@ public final class $1 {
} }
public static void main(String args[]) { public static void main(String args[]) {
new $1(); new $1();
} }
} }
EOF EOF
......
...@@ -44,18 +44,18 @@ public final class $1 { ...@@ -44,18 +44,18 @@ public final class $1 {
public long m1(int i) { public long m1(int i) {
long r=0; long r=0;
r = m2(i * 2); // @1 commentout r = m2(i * 2); // @1 commentout
// @1 uncomment r =m2(i * 2L); // @1 uncomment r =m2(i * 2L);
return r; return r;
} }
public long m2(int j) { public long m2(int j) {
System.out.println(System.getProperty("line.separator") + System.out.println(System.getProperty("line.separator") +
"**** public long m2(int j) with value: " + j); "**** public long m2(int j) with value: " + j);
return j; return j;
} }
public long m2(long j) { public long m2(long j) {
System.out.println(System.getProperty("line.separator") + System.out.println(System.getProperty("line.separator") +
"**** public long m2(long j) with value: " + j); "**** public long m2(long j) with value: " + j);
return j; return j;
} }
...@@ -66,7 +66,7 @@ public final class $1 { ...@@ -66,7 +66,7 @@ public final class $1 {
r1 = m1(1000); r1 = m1(1000);
r2 = 0; // @1 breakpoint r2 = 0; // @1 breakpoint
r2 = m1(1000); r2 = m1(1000);
if (r1 != r2) { // @1 breakpoint if (r1 != r2) { // @1 breakpoint
throw new Exception("FAILURE: Expected value: " + r1 + " Actual value: " + r2); throw new Exception("FAILURE: Expected value: " + r1 + " Actual value: " + r2);
} else { } else {
System.out.println("SUCCESS: Expected value: " + r1 + " Actual value: " + r2); System.out.println("SUCCESS: Expected value: " + r1 + " Actual value: " + r2);
...@@ -74,7 +74,7 @@ public final class $1 { ...@@ -74,7 +74,7 @@ public final class $1 {
} }
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
new $1().doit(); new $1().doit();
} }
} }
EOF EOF
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
# questions. # questions.
# #
# @test @(#)StringConvertTest.sh 1.6 03/04/09 # @test
# @bug 4511950 4843082 # @bug 4511950 4843082
# @summary 1. jdb's expression evaluation doesn't perform string conversion properly # @summary 1. jdb's expression evaluation doesn't perform string conversion properly
# 2. TTY: run on expression evaluation # 2. TTY: run on expression evaluation
......
...@@ -68,9 +68,9 @@ if [ -z "${TESTJAVA}" ] ; then ...@@ -68,9 +68,9 @@ if [ -z "${TESTJAVA}" ] ; then
# is given on the command line, tell the user that and use a default. # is given on the command line, tell the user that and use a default.
# THIS IS THE JDK BEING TESTED. # THIS IS THE JDK BEING TESTED.
if [ -n "$1" ] ; then if [ -n "$1" ] ; then
TESTJAVA=$1 TESTJAVA=$1
else else
TESTJAVA=$JAVA_HOME TESTJAVA=$JAVA_HOME
fi fi
TESTSRC=. TESTSRC=.
TESTCLASSES=. TESTCLASSES=.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册