[java] Consolidate test packages

This commit is contained in:
Andreas Dangel
2024-02-23 14:54:22 +01:00
parent 194f759533
commit a00916b4f0
10 changed files with 9 additions and 14 deletions

View File

@ -2,14 +2,13 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
package net.sourceforge.pmd.lang.java;
import static net.sourceforge.pmd.lang.test.ast.TestUtilsKt.assertSize;
import static net.sourceforge.pmd.lang.test.ast.TestUtilsKt.assertSuppressed;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.lang.java.BaseParserTest;
import net.sourceforge.pmd.lang.java.ast.ASTVariableId;
import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;
import net.sourceforge.pmd.lang.rule.Rule;

View File

@ -2,7 +2,7 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
package net.sourceforge.pmd.lang.java;
import net.sourceforge.pmd.lang.java.ast.ASTClassDeclaration;
import net.sourceforge.pmd.lang.java.ast.ASTVariableId;

View File

@ -2,7 +2,7 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
package net.sourceforge.pmd.lang.java;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ -11,11 +11,11 @@ import java.io.File;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.PMDConfiguration;
import net.sourceforge.pmd.lang.Language;
import net.sourceforge.pmd.lang.LanguageRegistry;
import net.sourceforge.pmd.lang.LanguageVersion;
import net.sourceforge.pmd.lang.LanguageVersionDiscoverer;
import net.sourceforge.pmd.lang.java.JavaLanguageModule;
class LanguageVersionDiscovererTest {

View File

@ -2,7 +2,7 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.coverage;
package net.sourceforge.pmd.lang.java;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
@ -25,7 +25,6 @@ import net.sourceforge.pmd.PMDConfiguration;
import net.sourceforge.pmd.PmdAnalysis;
import net.sourceforge.pmd.internal.util.IOUtil;
import net.sourceforge.pmd.lang.LanguageVersion;
import net.sourceforge.pmd.lang.java.JavaLanguageModule;
import com.github.stefanbirkner.systemlambda.SystemLambda;

View File

@ -2,7 +2,7 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.ant;
package net.sourceforge.pmd.lang.java;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
@ -19,6 +19,7 @@ import net.sourceforge.pmd.test.AbstractAntTestHelper;
class PMDTaskTest extends AbstractAntTestHelper {
PMDTaskTest() {
pathToTestScript = "target/test-classes/net/sourceforge/pmd/lang/java/ant/xml";
antTestScriptFilename = "pmdtasktest.xml";
}

View File

@ -2,7 +2,7 @@
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd;
package net.sourceforge.pmd.lang.java;
import static net.sourceforge.pmd.lang.test.ast.TestUtilsKt.assertSize;
import static net.sourceforge.pmd.lang.test.ast.TestUtilsKt.assertSuppressed;
@ -13,7 +13,6 @@ import java.util.regex.Pattern;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.lang.java.JavaParsingHelper;
import net.sourceforge.pmd.lang.rule.Rule;
import net.sourceforge.pmd.reporting.Report;

View File

@ -9,7 +9,6 @@ import static net.sourceforge.pmd.lang.test.ast.TestUtilsKt.assertSize;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.junit.jupiter.api.Test;
import net.sourceforge.pmd.FooRule;
import net.sourceforge.pmd.lang.java.ast.ASTClassDeclaration;
import net.sourceforge.pmd.lang.java.ast.ASTCompilationUnit;
import net.sourceforge.pmd.lang.java.rule.AbstractJavaRule;

View File

@ -101,9 +101,7 @@
<classpath>
<pathelement path="${pmd.home}/target/classes"/>
<pathelement path="${pmd.home}/target/test-classes"/>
<pathelement path="${pmd.home}/target/test-classes/net/sourceforge/pmd/ant"/>
<pathelement path="${pmd.home}/target/clover/test-classes"/>
<pathelement path="${pmd.home}/target/clover/test-classes/net/sourceforge/pmd/ant"/>
<pathelement path="${pmd.home}/target/test-classes/net/sourceforge/pmd/lang/java/ant"/>
</classpath>
</pmd>
</target>