8163231: A couple of runtime tests failing for the -testset hotspot snapshot job
authordarcy
Thu, 04 Aug 2016 15:52:14 -0700
changeset 39959 3c8f8c98ad2a
parent 39958 6789ef70e1c1
child 40108 2bf4f6d6a72f
8163231: A couple of runtime tests failing for the -testset hotspot snapshot job Reviewed-by: acorn
hotspot/test/runtime/8007320/ConstMethodTest.java
hotspot/test/runtime/RedefineTests/RedefineAnnotations.java
--- a/hotspot/test/runtime/8007320/ConstMethodTest.java	Thu Aug 04 17:32:52 2016 +0000
+++ b/hotspot/test/runtime/8007320/ConstMethodTest.java	Thu Aug 04 15:52:14 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8007320 8014709
+ * @bug 8007320 8014709 8163231
  * @summary Test all optional fields in ConstMethod
  * @compile -g -parameters ConstMethodTest.java
  * @run main ConstMethodTest
@@ -122,8 +122,8 @@
                 equal(ann.length, 3);
                 Annotation foo = ann[0][0];
                 Annotation bar = ann[1][0];
-                equal(foo.toString(), "@Named(value=aName)");
-                equal(bar.toString(), "@Named(value=bName)");
+                equal(foo.toString(), "@Named(value=\"aName\")");
+                equal(bar.toString(), "@Named(value=\"bName\")");
                 check(foo.equals(foo));
                 check(bar.equals(bar));
                 check(! foo.equals(bar));
@@ -131,7 +131,7 @@
                 Annotation[] ann2 = m.getAnnotations();
                 equal(ann2.length, 1);
                 Annotation mann = ann2[0];
-                equal(mann.toString(), "@MyAnnotation(date=today, name=someName, value=Hello World)");
+                equal(mann.toString(), "@MyAnnotation(date=\"today\", name=\"someName\", value=\"Hello World\")");
                 // Test Method parameter names
                 Parameter[] parameters = m.getParameters();
                 if(parameters == null)
--- a/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java	Thu Aug 04 17:32:52 2016 +0000
+++ b/hotspot/test/runtime/RedefineTests/RedefineAnnotations.java	Thu Aug 04 15:52:14 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -370,7 +370,7 @@
     }
 
     private static void verifyTestAnnSite(Annotation testAnn, String expectedSite) {
-        String expectedAnn = "@TestAnn(site=" + expectedSite + ")";
+        String expectedAnn = "@TestAnn(site=\"" + expectedSite + "\")";
         assertTrue(testAnn.toString().equals(expectedAnn),
                    "Expected \"" + expectedAnn + "\", got \"" + testAnn + "\"");
     }