[jruby-joni] 79/194: silence warnings during test run

Hideki Yamane henrich at moszumanska.debian.org
Thu Feb 1 12:04:29 UTC 2018


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit 42e27febfe762ede4901bdb973be40eb9238cffe
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Sun Dec 31 14:33:51 2017 +0100

    silence warnings during test run
---
 test/org/joni/test/Test.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/test/org/joni/test/Test.java b/test/org/joni/test/Test.java
index 3f66337..5050d35 100644
--- a/test/org/joni/test/Test.java
+++ b/test/org/joni/test/Test.java
@@ -30,10 +30,15 @@ import org.joni.Option;
 import org.joni.Regex;
 import org.joni.Region;
 import org.joni.Syntax;
+import org.joni.WarnCallback;
 import org.joni.exception.JOniException;
 
 public abstract class Test {
     static final boolean VERBOSE = false;
+    static final WarnCallback TEST_WARNINGS = new WarnCallback() {
+		public void warn(String message) {
+		}
+	};
 
     int nsucc;
     int nerror;
@@ -69,7 +74,7 @@ public abstract class Test {
         Regex reg;
 
         try {
-            reg = new Regex(pattern, 0, length(pattern), option, encoding(), syntax());
+            reg = new Regex(pattern, 0, length(pattern), option, encoding(), syntax(), TEST_WARNINGS);
         } catch (JOniException je) {
             Config.err.println("Pattern: " + repr(pattern) + " Str: " + repr(str));
             je.printStackTrace(Config.err);
@@ -136,7 +141,7 @@ public abstract class Test {
         Regex reg;
 
         try {
-            reg = new Regex(pattern, 0, length(pattern), option, encoding(), syntax());
+            reg = new Regex(pattern, 0, length(pattern), option, encoding(), syntax(), TEST_WARNINGS);
         } catch (JOniException je) {
             Config.err.println("Pattern: " + repr(pattern) + " Str: " + repr(str));
             je.printStackTrace(Config.err);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list