65 static boolean debuggerWatching = false;
66 static int failureCount = 0;
67 /*
68 * These are the values that will be used by methods
69 * returning normally.
70 */
71 static URL[] urls = new URL[1];
72 public static byte byteValue = 89;
73 public static char charValue = 'x';
74 public static double doubleValue = 2.2;
75 public static float floatValue = 3.3f;
76 public static int intValue = 1;
77 public static long longValue = Long.MAX_VALUE;
78 public static short shortValue = 8;
79 public static boolean booleanValue = false;
80
81 public static Class classValue = Object.class;
82 public static ClassLoader classLoaderValue;
83 {
84 try {
85 urls[0] = new URL("hi there");
86 } catch (java.net.MalformedURLException ee) {
87 }
88 classLoaderValue = new URLClassLoader(urls);
89 }
90
91 public static Thread threadValue = Thread.currentThread();
92 public static ThreadGroup threadGroupValue = threadValue.getThreadGroup();
93 public static String stringValue = "abc";
94 public static int[] intArrayValue = new int[] {1, 2, 3};
95
96 public static EarlyReturnTarg objectValue =
97 new EarlyReturnTarg();
98 public String ivar = stringValue;
99
100 /*
101 * These are the values that will be used by methods
102 * returning early. These are != the normal values
103 * defined above.
104 */
105 static URL[] eurls = new URL[1];
106 public static byte ebyteValue = 42;
107 public static char echarValue = 'a';
108 public static double edoubleValue = 6.6;
109 public static float efloatValue = 9.9f;
110 public static int eintValue = 7;
111 public static long elongValue = Long.MIN_VALUE;
112 public static short eshortValue = 3;
113 public static boolean ebooleanValue = true;
114
115 public static Class eclassValue = String.class;
116 public static ClassLoader eclassLoaderValue;
117 {
118 try {
119 urls[0] = new URL("been there, done that");
120 } catch (java.net.MalformedURLException ee) {
121 }
122 classLoaderValue = new URLClassLoader(urls);
123 }
124 public static Thread ethreadValue;
125 public static ThreadGroup ethreadGroupValue;
126 public static String estringValue = "wxyz";
127 public static int[] eintArrayValue = new int[] {10, 11, 12};
128
129 public static java.util.Date eobjectValue = new java.util.Date();
130
131 // Used to check the return values seen on the debugee side
132 public static boolean chk(byte v) {
133 return v == (debuggerWatching ? ebyteValue: byteValue);
134 }
135 public static boolean chk(char v) {
136 return v == (debuggerWatching ? echarValue: charValue);
137 }
138 public static boolean chk(double v) {
139 return v == (debuggerWatching ? edoubleValue: doubleValue);
140 }
|
65 static boolean debuggerWatching = false;
66 static int failureCount = 0;
67 /*
68 * These are the values that will be used by methods
69 * returning normally.
70 */
71 static URL[] urls = new URL[1];
72 public static byte byteValue = 89;
73 public static char charValue = 'x';
74 public static double doubleValue = 2.2;
75 public static float floatValue = 3.3f;
76 public static int intValue = 1;
77 public static long longValue = Long.MAX_VALUE;
78 public static short shortValue = 8;
79 public static boolean booleanValue = false;
80
81 public static Class classValue = Object.class;
82 public static ClassLoader classLoaderValue;
83 {
84 try {
85 urls[0] = new URL("file:/foo");
86 } catch (java.net.MalformedURLException ex) {
87 throw new AssertionError(ex);
88 }
89 classLoaderValue = new URLClassLoader(urls);
90 }
91
92 public static Thread threadValue = Thread.currentThread();
93 public static ThreadGroup threadGroupValue = threadValue.getThreadGroup();
94 public static String stringValue = "abc";
95 public static int[] intArrayValue = new int[] {1, 2, 3};
96
97 public static EarlyReturnTarg objectValue =
98 new EarlyReturnTarg();
99 public String ivar = stringValue;
100
101 /*
102 * These are the values that will be used by methods
103 * returning early. These are != the normal values
104 * defined above.
105 */
106 static URL[] eurls = new URL[1];
107 public static byte ebyteValue = 42;
108 public static char echarValue = 'a';
109 public static double edoubleValue = 6.6;
110 public static float efloatValue = 9.9f;
111 public static int eintValue = 7;
112 public static long elongValue = Long.MIN_VALUE;
113 public static short eshortValue = 3;
114 public static boolean ebooleanValue = true;
115
116 public static Class eclassValue = String.class;
117 public static ClassLoader eclassLoaderValue;
118 {
119 try {
120 urls[0] = new URL("file:/bar");
121 } catch (java.net.MalformedURLException ex) {
122 throw new AssertionError(ex);
123 }
124 classLoaderValue = new URLClassLoader(urls);
125 }
126 public static Thread ethreadValue;
127 public static ThreadGroup ethreadGroupValue;
128 public static String estringValue = "wxyz";
129 public static int[] eintArrayValue = new int[] {10, 11, 12};
130
131 public static java.util.Date eobjectValue = new java.util.Date();
132
133 // Used to check the return values seen on the debugee side
134 public static boolean chk(byte v) {
135 return v == (debuggerWatching ? ebyteValue: byteValue);
136 }
137 public static boolean chk(char v) {
138 return v == (debuggerWatching ? echarValue: charValue);
139 }
140 public static boolean chk(double v) {
141 return v == (debuggerWatching ? edoubleValue: doubleValue);
142 }
|