[jruby-joni] 107/194: rejigger tests again
Hideki Yamane
henrich at moszumanska.debian.org
Thu Feb 1 12:04:32 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 6e092429696bb1415e417fbdd1eeec2df6eb8b84
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Fri Jan 5 17:40:23 2018 +0100
rejigger tests again
---
test/org/joni/test/Test.java | 5 ++++-
test/org/joni/test/TestA.java | 2 --
test/org/joni/test/TestC.java | 2 --
test/org/joni/test/TestCornerCases.java | 7 +++----
test/org/joni/test/TestCrnl.java | 2 --
test/org/joni/test/TestInterrupt.java | 34 ++++++++++++++++-----------------
test/org/joni/test/TestNSU8.java | 2 --
test/org/joni/test/TestPerl.java | 1 -
test/org/joni/test/TestU.java | 2 --
test/org/joni/test/TestU8.java | 3 ---
10 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/test/org/joni/test/Test.java b/test/org/joni/test/Test.java
index 0c43233..1c445cd 100644
--- a/test/org/joni/test/Test.java
+++ b/test/org/joni/test/Test.java
@@ -208,8 +208,11 @@ public abstract class Test {
}
@org.junit.Test
- public void test() throws Exception {
+ public void testRegexp() throws Exception {
+ test();
Config.log.println("RESULT SUCC: " + nsucc + ", FAIL: " + nfail + ", ERROR: " + nerror + " Test: " + getClass().getSimpleName() + ", Encoding: " + encoding());
assertEquals(0, nfail + nerror);
}
+
+ public abstract void test() throws Exception;
}
diff --git a/test/org/joni/test/TestA.java b/test/org/joni/test/TestA.java
index ea10698..1e3a1d9 100644
--- a/test/org/joni/test/TestA.java
+++ b/test/org/joni/test/TestA.java
@@ -534,7 +534,5 @@ public class TestA extends Test {
x2s("\\X{5}", "ăăab\n", 0, 5);
x2s("\\X{5}", "あいab\n", 0, 5);
x2s("(?<=a).*b", "aab", 1, 3);
-
- super.test();
}
}
diff --git a/test/org/joni/test/TestC.java b/test/org/joni/test/TestC.java
index 33e5946..2549086 100755
--- a/test/org/joni/test/TestC.java
+++ b/test/org/joni/test/TestC.java
@@ -727,8 +727,6 @@ public class TestC extends Test {
ns("[^[^a-z\u00a4\u02d8\u00a4\u00a4\u00a4\u00a6]&&[^bcdefg\u00a4\u00a6\u00a4\u00a8\u00a4\u015e]g-w]", "2");
x2s("a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9<\\/b>", "a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9</b>", 0, 32);
x2s(".<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9<\\/b>", "a<b>\u0104\u0110\u02c7\u013d\u0104\u00b8\u0104\u00e7\u0104\u00f3\u00a4\u00ce\u0104\u0154\u0104\u00a6\u0104\u00f3\u0104\u00ed\u02c7\u013d\u0104\u00c9</b>", 0, 32);
-
- super.test();
}
}
diff --git a/test/org/joni/test/TestCornerCases.java b/test/org/joni/test/TestCornerCases.java
index 6b1c850..3104772 100755
--- a/test/org/joni/test/TestCornerCases.java
+++ b/test/org/joni/test/TestCornerCases.java
@@ -19,13 +19,12 @@
*/
package org.joni.test;
+import org.jcodings.Encoding;
+import org.jcodings.specific.ASCIIEncoding;
import org.joni.Config;
import org.joni.Option;
import org.joni.Regex;
-import org.joni.Region;
import org.joni.Syntax;
-import org.jcodings.Encoding;
-import org.jcodings.specific.ASCIIEncoding;
public class TestCornerCases extends Test {
@Override
@@ -44,6 +43,7 @@ public class TestCornerCases extends Test {
public Syntax syntax() {
return Syntax.TEST;
}
+
@Override
public void test() throws Exception {
byte[] reg = "l.".getBytes();
@@ -55,6 +55,5 @@ public class TestCornerCases extends Test {
Config.log.println("FAIL: /l./ 'hello,lo' - with reverse, 3,0");
nfail++;
}
- super.test();
}
}
diff --git a/test/org/joni/test/TestCrnl.java b/test/org/joni/test/TestCrnl.java
index 3268c98..8504430 100755
--- a/test/org/joni/test/TestCrnl.java
+++ b/test/org/joni/test/TestCrnl.java
@@ -80,7 +80,5 @@ public class TestCrnl extends Test {
x2s("(?!a\\Z)..", "a\r", 0, 2);
if (nfail > 0 || nerror > 0) Config.err.println("make sure to enable USE_CRNL_AS_LINE_TERMINATOR");
- super.test();
}
-
}
diff --git a/test/org/joni/test/TestInterrupt.java b/test/org/joni/test/TestInterrupt.java
index 253f888..0656dc4 100755
--- a/test/org/joni/test/TestInterrupt.java
+++ b/test/org/joni/test/TestInterrupt.java
@@ -40,6 +40,23 @@ public class TestInterrupt extends Test {
public void run() throws InterruptedException;
}
+ @Override
+ public int option() {
+ return Option.DEFAULT;
+ }
+ @Override
+ public Encoding encoding() {
+ return ASCIIEncoding.INSTANCE;
+ }
+ @Override
+ public String testEncoding() {
+ return "iso-8859-2";
+ }
+ @Override
+ public Syntax syntax() {
+ return Syntax.DEFAULT;
+ }
+
@org.junit.Test
public void test() throws Exception {
interruptAfter(new InterruptibleRunnable() {
@@ -63,7 +80,6 @@ public class TestInterrupt extends Test {
}, 1000, 15000);
assertTrue(status[0] == Matcher.INTERRUPTED, "Status was not INTERRUPTED: " + status[0]);
- super.test();
}
private void interruptAfter(InterruptibleRunnable block, int delayBeforeInterrupt, int acceptableMaximumTime) {
@@ -88,20 +104,4 @@ public class TestInterrupt extends Test {
System.out.println("Time taken: " + total);
assertTrue(total < acceptableMaximumTime, "Took too long to interrupt: " + total + " > " + acceptableMaximumTime);
}
- @Override
- public int option() {
- return Option.DEFAULT;
- }
- @Override
- public Encoding encoding() {
- return ASCIIEncoding.INSTANCE;
- }
- @Override
- public String testEncoding() {
- return "iso-8859-2";
- }
- @Override
- public Syntax syntax() {
- return Syntax.DEFAULT;
- }
}
diff --git a/test/org/joni/test/TestNSU8.java b/test/org/joni/test/TestNSU8.java
index 3503d38..9f00ed4 100755
--- a/test/org/joni/test/TestNSU8.java
+++ b/test/org/joni/test/TestNSU8.java
@@ -57,7 +57,5 @@ public class TestNSU8 extends Test {
xx("([^\\[\\]]+)".getBytes(), new byte[]{(byte)192, (byte)32, (byte)32}, 0, 3, 1, false);
xx("([^\\[\\]]+)".getBytes(), new byte[]{(byte)192, (byte)32}, 0, 2, 1, false);
xx("([^\\[\\]]+)".getBytes(), new byte[]{(byte)192}, 0, 1, 1, false);
-
- super.test();
}
}
diff --git a/test/org/joni/test/TestPerl.java b/test/org/joni/test/TestPerl.java
index 4b77fff..98bbf09 100755
--- a/test/org/joni/test/TestPerl.java
+++ b/test/org/joni/test/TestPerl.java
@@ -43,6 +43,5 @@ public class TestPerl extends Test {
}
@Override
public void test() throws Exception {
- super.test();
}
}
diff --git a/test/org/joni/test/TestU.java b/test/org/joni/test/TestU.java
index f2e8b15..4f4a2f2 100755
--- a/test/org/joni/test/TestU.java
+++ b/test/org/joni/test/TestU.java
@@ -793,7 +793,5 @@ public class TestU extends Test {
// Case fold exceeding Analyser#THRESHOLD_CASE_FOLD_ALT_FOR_EXPANSION (= 8)
x2s("\u0000\u0041\u0000\u0041\u0000\u0041\u0000\u0041\000\000", "\u0000\u0061\u0000\u0061\u0000\u0061\u0000\u0061\000\000", 0, 8, Option.IGNORECASE);
-
- super.test();
}
}
diff --git a/test/org/joni/test/TestU8.java b/test/org/joni/test/TestU8.java
index aea994e..b474199 100755
--- a/test/org/joni/test/TestU8.java
+++ b/test/org/joni/test/TestU8.java
@@ -282,8 +282,5 @@ public class TestU8 extends Test {
x2s("\\b.*abc.*\\b", "abc", 0, 3);
x2s("(?!a).*b", "ab", 1, 2);
x2s("(?!^a).*b", "ab", 1, 2);
-
- super.test();
}
-
}
--
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