hotspot/test/testlibrary/OutputAnalyzerTest.java
changeset 19991 d0d0186a8cd6
parent 16666 da191c7e38d2
--- a/hotspot/test/testlibrary/OutputAnalyzerTest.java	Fri Sep 13 22:21:06 2013 +0200
+++ b/hotspot/test/testlibrary/OutputAnalyzerTest.java	Fri Sep 13 22:22:14 2013 +0200
@@ -172,5 +172,22 @@
     } catch (RuntimeException e) {
         // expected
     }
+
+    {
+      String aaaa = "aaaa";
+      String result = output.firstMatch(aaaa);
+      if (!aaaa.equals(result)) {
+        throw new Exception("firstMatch(String) faild to match. Expected: " + aaaa + " got: " + result);
+      }
+    }
+
+    {
+      String aa = "aa";
+      String aa_grouped_aa = aa + "(" + aa + ")";
+      String result = output.firstMatch(aa_grouped_aa, 1);
+      if (!aa.equals(result)) {
+        throw new Exception("firstMatch(String, int) failed to match. Expected: " + aa + " got: " + result);
+      }
+    }
   }
 }