Migrate LanguageVersionTests to JUnit5

Also move LanguageVersionTests into their language packages
and add missing tests
This commit is contained in:
Andreas Dangel
2022-10-13 16:00:00 +02:00
parent 8688838190
commit 00924bea75
25 changed files with 348 additions and 363 deletions

View File

@ -25,6 +25,6 @@ public class KotlinLanguageModule extends BaseLanguageModule {
*/
public KotlinLanguageModule() {
super(NAME, null, TERSE_NAME, "kt", "ktm");
addDefaultVersion("1.6-rfc+0.1", new KotlinHandler(), "1.6");
addDefaultVersion("", new KotlinHandler(), "1.6", "1.6-rfc+0.1");
}
}

View File

@ -0,0 +1,21 @@
/*
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
*/
package net.sourceforge.pmd.lang.kotlin;
import java.util.Arrays;
import java.util.Collection;
import net.sourceforge.pmd.AbstractLanguageVersionTest;
class LanguageVersionTest extends AbstractLanguageVersionTest {
static Collection<TestDescriptor> data() {
return Arrays.asList(
new TestDescriptor(KotlinLanguageModule.NAME, KotlinLanguageModule.TERSE_NAME, "",
getLanguage(KotlinLanguageModule.NAME).getDefaultVersion()),
new TestDescriptor(KotlinLanguageModule.NAME, KotlinLanguageModule.TERSE_NAME, "1.6",
getLanguage(KotlinLanguageModule.NAME).getDefaultVersion()));
}
}