You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ga...@apache.org on 2014/11/16 15:30:29 UTC
svn commit: r1639991 - in /xmlgraphics/batik/branches/junit:
test-sources/org/apache/batik/ext/awt/geom/
test-sources/org/apache/batik/ext/awt/image/codec/
test-sources/org/apache/batik/ext/awt/image/codec/png/
test-sources/org/apache/batik/util/ test/...
Author: gadams
Date: Sun Nov 16 14:30:28 2014
New Revision: 1639991
URL: http://svn.apache.org/r1639991
Log:
Continue converting unit tests.
Added:
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/Messages.java
- copied unchanged from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/Messages.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/RectListManagerTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/Messages.java
- copied unchanged from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/Messages.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ApplicationSecurityEnforcerTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ApplicationSecurityEnforcerTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/Base64TestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/Base64Test.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLDataTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLDataTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/RunnableQueueTestCase.java
- copied, changed from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/RunnableQueueTest.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/TestMessages.java
- copied unchanged from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/TestMessages.java
xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ThreadPounder.java
- copied unchanged from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ThreadPounder.java
Removed:
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/Messages.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/Messages.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ApplicationSecurityEnforcerTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/Base64Test.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLDataTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/RunnableQueueTest.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/TestMessages.java
xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ThreadPounder.java
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/RectListManagerTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/RectListManagerTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/RectListManagerTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/geom/RectListManagerTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/geom/RectListManagerTestCase.java Sun Nov 16 14:30:28 2014
@@ -37,9 +37,14 @@ import java.util.StringTokenizer;
import org.apache.batik.test.AbstractTest;
import org.apache.batik.test.DefaultTestReport;
import org.apache.batik.test.TestReport;
-import org.apache.batik.util.Base64Test;
+import org.apache.batik.util.Base64TestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* This test validates that the text selection API's work properly.
@@ -47,7 +52,8 @@ import org.apache.batik.util.Base64Test;
* @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
* @version $Id$
*/
-public class RectListManagerTest extends AbstractTest {
+@Ignore
+public class RectListManagerTestCase extends AbstractTest {
/**
* Directory for reference files
@@ -106,7 +112,7 @@ public class RectListManagerTest extends
* @param rects The rects file to load
* @param ref The reference file.
*/
- public RectListManagerTest(String rects, String ref) {
+ public RectListManagerTestCase(String rects, String ref) {
this.rects = resolveURL(REFERENCE_DIR+rects);
this.ref = resolveURL(REFERENCE_DIR+ref);
this.var = resolveURL(REFERENCE_DIR+VARIATION_DIR+ref);
@@ -378,7 +384,7 @@ public class RectListManagerTest extends
return mismatch;
}
public void run() {
- mismatch = Base64Test.compareStreams (is1, is2, true);
+ mismatch = Base64TestCase.compareStreams (is1, is2, true);
}
}
}
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/Base64PNGEncoderTestCase.java Sun Nov 16 14:30:28 2014
@@ -26,6 +26,12 @@ import java.io.OutputStream;
import org.apache.batik.util.Base64DecodeStream;
import org.apache.batik.util.Base64EncoderStream;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* This test validates the PNGEncoder operation when combined with
@@ -34,7 +40,8 @@ import org.apache.batik.util.Base64Encod
* @author <a href="mailto:vhardy@eng.sun.com">Vincent Hardy</a>
* @version $Id$
*/
-public class Base64PNGEncoderTest extends PNGEncoderTest {
+@Ignore
+public class Base64PNGEncoderTestCase extends PNGEncoderTestCase {
/**
* Template method for building the PNG output stream
*/
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/ext/awt/image/codec/png/PNGEncoderTestCase.java Sun Nov 16 14:30:28 2014
@@ -23,6 +23,13 @@ import java.awt.geom.*;
import java.awt.image.*;
import java.io.*;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* This test validates the PNGEncoder operation. It creates a
* BufferedImage, then encodes it with the PNGEncoder, then
@@ -31,7 +38,8 @@ import java.io.*;
* @author <a href="mailto:vhardy@eng.sun.com">Vincent Hardy</a>
* @version $Id$
*/
-public class PNGEncoderTest extends AbstractTest {
+@Ignore
+public class PNGEncoderTestCase extends AbstractTest {
/**
* Error when image cannot be encoded
* {0} = trace for the exception which was reported
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ApplicationSecurityEnforcerTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ApplicationSecurityEnforcerTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ApplicationSecurityEnforcerTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ApplicationSecurityEnforcerTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ApplicationSecurityEnforcerTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ApplicationSecurityEnforcerTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ApplicationSecurityEnforcerTestCase.java Sun Nov 16 14:30:28 2014
@@ -20,20 +20,28 @@ package org.apache.batik.util;
import org.apache.batik.test.*;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* Validates the operation of the security enforcer class.
*
* @author <a mailto="vincent.hardy@sun.com">Vincent Hardy</a>
* @version $Id$
*/
-public class ApplicationSecurityEnforcerTest extends DefaultTestSuite {
+@Ignore
+public class ApplicationSecurityEnforcerTestCase extends DefaultTestSuite {
static final Class APP_MAIN_CLASS = org.apache.batik.apps.svgbrowser.Main.class;
static final String APP_SECURITY_POLICY = "org/apache/batik/apps/svgbrowser/resources/svgbrowser.policy";
/**
* In the constructor, append atomic tests
*/
- public ApplicationSecurityEnforcerTest(){
+ public ApplicationSecurityEnforcerTestCase(){
addTest(new CheckNoSecurityManagerOverride());
addTest(new CheckSecurityEnforcement());
addTest(new CheckSecurityRemoval());
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/Base64TestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/Base64Test.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/Base64TestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/Base64TestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/Base64Test.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/Base64Test.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/Base64TestCase.java Sun Nov 16 14:30:28 2014
@@ -32,13 +32,21 @@ import java.io.PrintWriter;
import java.net.URL;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* This test validates that the Base65 encoder/decoders work properly.
*
* @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
* @version $Id$
*/
-public class Base64Test extends AbstractTest {
+@Ignore
+public class Base64TestCase extends AbstractTest {
/**
* Error when bad action string given.
* {0} = Bad action string
@@ -85,7 +93,7 @@ public class Base64Test extends Abstract
* @param in The source file to apply 'action' to.
* @param ref The reference file.
*/
- public Base64Test(String action, URL in, URL ref) {
+ public Base64TestCase(String action, URL in, URL ref) {
this.action = action;
this.in = in;
this.ref = ref;
@@ -95,7 +103,7 @@ public class Base64Test extends Abstract
* Constructor, for round trip testing (only one file required).
* @param in The source file to round trip.
*/
- public Base64Test(URL in) {
+ public Base64TestCase(URL in) {
this.action = "ROUND";
this.in = in;
}
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLDataTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLDataTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLDataTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLDataTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLDataTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLDataTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLDataTestCase.java Sun Nov 16 14:30:28 2014
@@ -26,6 +26,14 @@ import java.io.StringWriter;
import java.io.PrintWriter;
import java.io.InputStream;
import java.io.IOException;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* This test validates that the ParsedURL class properly parses and
* cascades URLs.
@@ -33,7 +41,8 @@ import java.io.IOException;
* @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
* @version $Id$
*/
-public class ParsedURLDataTest extends AbstractTest {
+@Ignore
+public class ParsedURLDataTestCase extends AbstractTest {
/**
* Error when unable to parse URL
* {0} = 'Base URL' or NULL
@@ -61,7 +70,7 @@ public class ParsedURLDataTest extends A
* @param url The url to parse
* @param ref The expected result.
*/
- public ParsedURLDataTest(String url, String ref ){
+ public ParsedURLDataTestCase(String url, String ref ){
this.base = url;
this.ref = ref;
}
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/ParsedURLTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/ParsedURLTestCase.java Sun Nov 16 14:30:28 2014
@@ -25,6 +25,13 @@ import org.apache.batik.test.TestReport;
import java.io.StringWriter;
import java.io.PrintWriter;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* This test validates that the ParsedURL class properly parses and
* cascades URLs.
@@ -32,7 +39,8 @@ import java.io.PrintWriter;
* @author <a href="mailto:deweese@apache.org">Thomas DeWeese</a>
* @version $Id$
*/
-public class ParsedURLTest extends AbstractTest {
+@Ignore
+public class ParsedURLTestCase extends AbstractTest {
/**
* Error when unable to parse URL
* {0} = 'Base URL' or NULL
@@ -61,7 +69,7 @@ public class ParsedURLTest extends Abstr
* @param url The url to parse
* @param ref The expected result.
*/
- public ParsedURLTest(String url, String ref ){
+ public ParsedURLTestCase(String url, String ref ){
this.base = url;
this.ref = ref;
}
@@ -72,7 +80,7 @@ public class ParsedURLTest extends Abstr
* @param sub The sub url (relative to base).
* @param ref The expected result.
*/
- public ParsedURLTest(String base, String sub, String ref){
+ public ParsedURLTestCase(String base, String sub, String ref){
this.base = base;
this.sub = sub;
this.ref = ref;
Copied: xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/RunnableQueueTestCase.java (from r1639985, xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/RunnableQueueTest.java)
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/RunnableQueueTestCase.java?p2=xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/RunnableQueueTestCase.java&p1=xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/RunnableQueueTest.java&r1=1639985&r2=1639991&rev=1639991&view=diff
==============================================================================
--- xmlgraphics/batik/branches/junit/test-sources/org/apache/batik/util/RunnableQueueTest.java (original)
+++ xmlgraphics/batik/branches/junit/test/java/org/apache/batik/util/RunnableQueueTestCase.java Sun Nov 16 14:30:28 2014
@@ -25,7 +25,15 @@ import java.util.Random;
import org.apache.batik.test.AbstractTest;
import org.apache.batik.test.TestReport;
-public class RunnableQueueTest extends AbstractTest {
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+@Ignore
+public class RunnableQueueTestCase extends AbstractTest {
public int nThreads;
public int activeThreads;
@@ -36,10 +44,10 @@ public class RunnableQueueTest extends A
* Creates a new RunnableQueueTest.
* @param nThreads number of runnables to queue
*/
- public RunnableQueueTest(int nThreads) {
+ public RunnableQueueTestCase(int nThreads) {
this.nThreads = nThreads;
}
- public RunnableQueueTest(Integer nThreads) {
+ public RunnableQueueTestCase(Integer nThreads) {
this((nThreads==null)?10:nThreads.intValue());
}
@@ -176,9 +184,9 @@ public class RunnableQueueTest extends A
}
} catch (InterruptedException ie) {
}
- synchronized(RunnableQueueTest.this) {
+ synchronized(RunnableQueueTestCase.this) {
activeThreads--;
- RunnableQueueTest.this.notify();
+ RunnableQueueTestCase.this.notify();
}
}
}
@@ -205,7 +213,7 @@ public class RunnableQueueTest extends A
}
public static void main(String []args) {
- RunnableQueueTest rqt = new RunnableQueueTest(20);
+ RunnableQueueTestCase rqt = new RunnableQueueTestCase(20);
try {
rqt.runImpl();
} catch (Exception e) {