test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestTranslatedException.java
changeset 58974 2b0f2fe82735
parent 55206 2fe2063fe567
child 59001 d595f1faace2
equal deleted inserted replaced
58973:291775bcf35d 58974:2b0f2fe82735
    18  *
    18  *
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20  * or visit www.oracle.com if you need additional information or have any
    20  * or visit www.oracle.com if you need additional information or have any
    21  * questions.
    21  * questions.
    22  */
    22  */
       
    23 
       
    24 /*
       
    25  * @test
       
    26  * @requires vm.jvmci
       
    27  * @modules jdk.internal.vm.ci/jdk.vm.ci.hotspot:open
       
    28  * @library /compiler/jvmci/jdk.vm.ci.hotspot.test/src
       
    29  * @ignore 8233745
       
    30  * @run testng/othervm
       
    31  *      -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:-UseJVMCICompiler
       
    32  *      jdk.vm.ci.hotspot.test.TestTranslatedException
       
    33  */
       
    34 
    23 package jdk.vm.ci.hotspot.test;
    35 package jdk.vm.ci.hotspot.test;
    24 
    36 
    25 import java.io.ByteArrayOutputStream;
    37 import java.io.ByteArrayOutputStream;
    26 import java.io.PrintStream;
    38 import java.io.PrintStream;
    27 import java.lang.reflect.InvocationTargetException;
    39 import java.lang.reflect.InvocationTargetException;
    28 import java.lang.reflect.Method;
    40 import java.lang.reflect.Method;
    29 
    41 
    30 import org.junit.Assert;
    42 import org.testng.Assert;
    31 import org.junit.Test;
    43 import org.testng.annotations.Test;
    32 
    44 
    33 public class TestTranslatedException {
    45 public class TestTranslatedException {
    34 
    46 
    35     private static String printToString(Throwable throwable) {
    47     private static String printToString(Throwable throwable) {
    36         ByteArrayOutputStream baos = new ByteArrayOutputStream();
    48         ByteArrayOutputStream baos = new ByteArrayOutputStream();
    69 
    81 
    70         after = after.replace(
    82         after = after.replace(
    71                         "jdk.vm.ci.hotspot.TranslatedException: [java.lang.ClassNotFoundException: jdk/vm/ci/hotspot/test/TestTranslatedException$Untranslatable]",
    83                         "jdk.vm.ci.hotspot.TranslatedException: [java.lang.ClassNotFoundException: jdk/vm/ci/hotspot/test/TestTranslatedException$Untranslatable]",
    72                         "jdk.vm.ci.hotspot.test.TestTranslatedException$Untranslatable: test exception");
    84                         "jdk.vm.ci.hotspot.test.TestTranslatedException$Untranslatable: test exception");
    73 
    85 
    74         Assert.assertEquals("before:\n" + before + "\nafter:\n" + after, before, after);
    86         Assert.assertEquals(before, after);
    75     }
    87     }
    76 }
    88 }