< prev index next >

test/jdk/com/sun/jdi/EarlyReturnNegativeTest.java

Print this page
8198933: Update JDI tests to pass valid URL[]
Reviewed-by: dholmes


  60 
  61 class EarlyReturnNegativeTarg {
  62     /*
  63      * These are the values that will be used by methods
  64      * returning normally.
  65      */
  66     static URL[] urls = new URL[1];
  67     public static byte      byteValue = 89;
  68     public static char      charValue = 'x';
  69     public static double    doubleValue = 2.2;
  70     public static float     floatValue = 3.3f;
  71     public static int       intValue = 1;
  72     public static long      longValue = Long.MAX_VALUE;
  73     public static short     shortValue = 8;
  74     public static boolean   booleanValue = false;
  75 
  76     public static Class       classValue = Object.class;
  77     public static ClassLoader classLoaderValue;
  78     {
  79         try {
  80             urls[0] = new URL("hi there");
  81         } catch (java.net.MalformedURLException ee) {

  82         }
  83         classLoaderValue = new URLClassLoader(urls);
  84     }
  85 
  86     public static Thread      threadValue = Thread.currentThread();
  87     public static ThreadGroup threadGroupValue = threadValue.getThreadGroup();
  88     public static String      stringValue = "abc";
  89     public static int[]       intArrayValue = new int[] {1, 2, 3};
  90     public static Object[]    objectArrayValue = new Object[] {"a", "b", "c"};
  91 
  92     public static EarlyReturnNegativeTarg  objectValue =
  93         new EarlyReturnNegativeTarg();
  94     public String ivar = stringValue;
  95 
  96 
  97     // Used to show which set of tests follows
  98     public static String s_show(String p1) { return p1;}
  99 
 100     // These are the instance methods
 101     public byte i_bytef()            { return byteValue; }




  60 
  61 class EarlyReturnNegativeTarg {
  62     /*
  63      * These are the values that will be used by methods
  64      * returning normally.
  65      */
  66     static URL[] urls = new URL[1];
  67     public static byte      byteValue = 89;
  68     public static char      charValue = 'x';
  69     public static double    doubleValue = 2.2;
  70     public static float     floatValue = 3.3f;
  71     public static int       intValue = 1;
  72     public static long      longValue = Long.MAX_VALUE;
  73     public static short     shortValue = 8;
  74     public static boolean   booleanValue = false;
  75 
  76     public static Class       classValue = Object.class;
  77     public static ClassLoader classLoaderValue;
  78     {
  79         try {
  80             urls[0] = new URL("file:/foo");
  81         } catch (java.net.MalformedURLException ex) {
  82             throw new AssertionError(ex);
  83         }
  84         classLoaderValue = new URLClassLoader(urls);
  85     }
  86 
  87     public static Thread      threadValue = Thread.currentThread();
  88     public static ThreadGroup threadGroupValue = threadValue.getThreadGroup();
  89     public static String      stringValue = "abc";
  90     public static int[]       intArrayValue = new int[] {1, 2, 3};
  91     public static Object[]    objectArrayValue = new Object[] {"a", "b", "c"};
  92 
  93     public static EarlyReturnNegativeTarg  objectValue =
  94         new EarlyReturnNegativeTarg();
  95     public String ivar = stringValue;
  96 
  97 
  98     // Used to show which set of tests follows
  99     public static String s_show(String p1) { return p1;}
 100 
 101     // These are the instance methods
 102     public byte i_bytef()            { return byteValue; }


< prev index next >