From 88e39cfbee00435401249c3f40c2fb7a82378234 Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Wed, 10 Jul 2024 17:36:58 +0200 Subject: [PATCH] Tests: move `echosvg-test-swing` stuff inside `echosvg-test`, for the convenience of IDEs Follow-up to c28920c16 --- echosvg-test-swing/build.gradle | 20 ------------- .../src/main/java/module-info.java | 29 ------------------- echosvg-test/build.gradle | 3 +- .../test/swing}/JSVGCanvasHandler.java | 2 +- .../echosvg/test/swing}/TestMessages.java | 2 +- echosvg-test/src/main/java/module-info.java | 7 +++++ .../echosvg/gvt/test/TextSelectionTest.java | 2 +- .../test/svg/JSVGRenderingAccuracyTest.java | 2 +- .../swing}/JSVGInterruptTest.java | 2 +- .../swing}/JSVGMemoryLeakTest.java | 2 +- .../swing}/NullSetSVGDocumentTest.java | 2 +- .../test => test/swing}/NullURITest.java | 2 +- .../swing}/SetSVGDocumentTest.java | 2 +- .../swing}/SwingMemoryLeakTest.java | 2 +- settings.gradle | 1 - 15 files changed, 19 insertions(+), 61 deletions(-) delete mode 100644 echosvg-test-swing/build.gradle delete mode 100644 echosvg-test-swing/src/main/java/module-info.java rename {echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test => echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing}/JSVGCanvasHandler.java (99%) rename {echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test => echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing}/TestMessages.java (98%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/JSVGInterruptTest.java (99%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/JSVGMemoryLeakTest.java (99%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/NullSetSVGDocumentTest.java (98%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/NullURITest.java (96%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/SetSVGDocumentTest.java (98%) rename echosvg-test/src/test/java/io/sf/carte/echosvg/{swing/test => test/swing}/SwingMemoryLeakTest.java (98%) diff --git a/echosvg-test-swing/build.gradle b/echosvg-test-swing/build.gradle deleted file mode 100644 index 7b99518c9..000000000 --- a/echosvg-test-swing/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'echosvg.java-conventions' -} - -dependencies { - api project(':echosvg-swing') -} - -description = 'io.sf.carte:echosvg-test-swing' - -publishing.publications.maven(MavenPublication).pom { - description = "EchoSVG Swing Tests" -} - -/* - * Maven repository deployments (disabled) - */ -tasks.withType(AbstractPublishToMaven).configureEach { - it.enabled = false -} diff --git a/echosvg-test-swing/src/main/java/module-info.java b/echosvg-test-swing/src/main/java/module-info.java deleted file mode 100644 index 88ca70a40..000000000 --- a/echosvg-test-swing/src/main/java/module-info.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * See the NOTICE file distributed with this work for additional - * information regarding copyright ownership. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * Swing tests. - */ -module io.sf.carte.echosvg.test.swing { - exports io.sf.carte.echosvg.swing.test; - - requires io.sf.carte.echosvg.bridge; - requires io.sf.carte.echosvg.i18n; - requires io.sf.carte.echosvg.script; - requires transitive io.sf.carte.echosvg.swing; - requires io.sf.carte.echosvg.util; -} diff --git a/echosvg-test/build.gradle b/echosvg-test/build.gradle index 9143072c4..399e121f5 100644 --- a/echosvg-test/build.gradle +++ b/echosvg-test/build.gradle @@ -31,8 +31,9 @@ dependencies { implementation project(':echosvg-i18n') implementation project(':echosvg-extension') implementation project(':echosvg-transcoder') + api project(':echosvg-swing') implementation "io.sf.jclf:jclf-text:${jclfTextVersion}" - testImplementation project(':echosvg-test-swing') + // Required by tests testImplementation testFixtures(project(':echosvg-util')) testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}" testRuntimeOnly 'org.junit.platform:junit-platform-launcher' diff --git a/echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/JSVGCanvasHandler.java b/echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/JSVGCanvasHandler.java similarity index 99% rename from echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/JSVGCanvasHandler.java rename to echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/JSVGCanvasHandler.java index 8fd2bcb04..9a05b8cf8 100644 --- a/echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/JSVGCanvasHandler.java +++ b/echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/JSVGCanvasHandler.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.awt.Dimension; import java.awt.EventQueue; diff --git a/echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/TestMessages.java b/echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/TestMessages.java similarity index 98% rename from echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/TestMessages.java rename to echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/TestMessages.java index 1adae8958..b4525d088 100644 --- a/echosvg-test-swing/src/main/java/io/sf/carte/echosvg/swing/test/TestMessages.java +++ b/echosvg-test/src/main/java/io/sf/carte/echosvg/test/swing/TestMessages.java @@ -17,7 +17,7 @@ */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.util.Locale; import java.util.MissingResourceException; diff --git a/echosvg-test/src/main/java/module-info.java b/echosvg-test/src/main/java/module-info.java index be9fb847d..39b3127a9 100644 --- a/echosvg-test/src/main/java/module-info.java +++ b/echosvg-test/src/main/java/module-info.java @@ -22,9 +22,16 @@ exports io.sf.carte.echosvg.test; exports io.sf.carte.echosvg.test.image; exports io.sf.carte.echosvg.test.svg; + exports io.sf.carte.echosvg.test.swing; + requires transitive io.sf.carte.echosvg.swing; requires io.sf.carte.echosvg.transcoder; requires io.sf.carte.echosvg.i18n; requires io.sf.jclf.text; requires transitive java.desktop; + + /* + * Required by tests. + */ + requires io.sf.carte.echosvg.constants; } diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/gvt/test/TextSelectionTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/gvt/test/TextSelectionTest.java index 4d3c70c2b..fd9feac1a 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/gvt/test/TextSelectionTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/gvt/test/TextSelectionTest.java @@ -30,8 +30,8 @@ import io.sf.carte.echosvg.swing.JSVGCanvas; import io.sf.carte.echosvg.swing.svg.JSVGComponent; -import io.sf.carte.echosvg.swing.test.JSVGCanvasHandler; import io.sf.carte.echosvg.test.svg.JSVGRenderingAccuracyTest; +import io.sf.carte.echosvg.test.swing.JSVGCanvasHandler; import io.sf.carte.echosvg.transcoder.TranscoderException; /** diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/JSVGRenderingAccuracyTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/JSVGRenderingAccuracyTest.java index ab647225c..267e19309 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/JSVGRenderingAccuracyTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/JSVGRenderingAccuracyTest.java @@ -29,7 +29,7 @@ import io.sf.carte.echosvg.swing.JSVGCanvas; import io.sf.carte.echosvg.swing.gvt.Overlay; -import io.sf.carte.echosvg.swing.test.JSVGCanvasHandler; +import io.sf.carte.echosvg.test.swing.JSVGCanvasHandler; /** * One line Class Desc diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGInterruptTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGInterruptTest.java similarity index 99% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGInterruptTest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGInterruptTest.java index 37e906d82..da07d8c85 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGInterruptTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGInterruptTest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.awt.EventQueue; import java.awt.geom.AffineTransform; diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGMemoryLeakTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGMemoryLeakTest.java similarity index 99% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGMemoryLeakTest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGMemoryLeakTest.java index 94182a0b6..2445c3b08 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/JSVGMemoryLeakTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/JSVGMemoryLeakTest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.io.IOException; import java.lang.ref.WeakReference; diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullSetSVGDocumentTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullSetSVGDocumentTest.java similarity index 98% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullSetSVGDocumentTest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullSetSVGDocumentTest.java index 374f6946c..85a6e7a24 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullSetSVGDocumentTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullSetSVGDocumentTest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.awt.EventQueue; import java.io.PrintWriter; diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullURITest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullURITest.java similarity index 96% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullURITest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullURITest.java index c8ba7afa3..6c3ce18db 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/NullURITest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/NullURITest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import io.sf.carte.echosvg.swing.JSVGCanvas; diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SetSVGDocumentTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SetSVGDocumentTest.java similarity index 98% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SetSVGDocumentTest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SetSVGDocumentTest.java index 117e3259a..d98136d30 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SetSVGDocumentTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SetSVGDocumentTest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import org.w3c.dom.DOMImplementation; import org.w3c.dom.Document; diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SwingMemoryLeakTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SwingMemoryLeakTest.java similarity index 98% rename from echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SwingMemoryLeakTest.java rename to echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SwingMemoryLeakTest.java index 84d0c0851..53f7ba4a0 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/swing/test/SwingMemoryLeakTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/swing/SwingMemoryLeakTest.java @@ -16,7 +16,7 @@ limitations under the License. */ -package io.sf.carte.echosvg.swing.test; +package io.sf.carte.echosvg.test.swing; import java.net.MalformedURLException; import java.net.URL; diff --git a/settings.gradle b/settings.gradle index 07c7a9899..6cb5be761 100644 --- a/settings.gradle +++ b/settings.gradle @@ -33,7 +33,6 @@ include(':echosvg-ttf2svg') include(':echosvg-slideshow') include(':echosvg-parser') include(':echosvg-gvt') -include(':echosvg-test-swing') include(':echosvg-test-scripts') include(':echosvg-test') include(':echosvg-all')