[swift] Migrate tests to JUnit5
This commit is contained in:
parent
b260cd011b
commit
2d459d9813
@ -70,8 +70,8 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<groupId>org.junit.jupiter</groupId>
|
||||
<artifactId>junit-jupiter</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -6,13 +6,13 @@ package net.sourceforge.pmd.cpd;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import net.sourceforge.pmd.cpd.test.CpdTextComparisonTest;
|
||||
|
||||
public class SwiftTokenizerTest extends CpdTextComparisonTest {
|
||||
class SwiftTokenizerTest extends CpdTextComparisonTest {
|
||||
|
||||
public SwiftTokenizerTest() {
|
||||
SwiftTokenizerTest() {
|
||||
super(".swift");
|
||||
}
|
||||
|
||||
@ -28,32 +28,32 @@ public class SwiftTokenizerTest extends CpdTextComparisonTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void testSwift42() {
|
||||
void testSwift42() {
|
||||
doTest("Swift4.2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwift50() {
|
||||
void testSwift50() {
|
||||
doTest("Swift5.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwift51() {
|
||||
void testSwift51() {
|
||||
doTest("Swift5.1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSwift52() {
|
||||
void testSwift52() {
|
||||
doTest("Swift5.2");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStackoverflowOnLongLiteral() {
|
||||
void testStackoverflowOnLongLiteral() {
|
||||
doTest("Issue628");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTabWidth() {
|
||||
void testTabWidth() {
|
||||
doTest("tabWidth");
|
||||
}
|
||||
}
|
||||
|
@ -4,20 +4,17 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.swift.ast;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class SwiftParserTests extends BaseSwiftTreeDumpTest {
|
||||
class SwiftParserTests extends BaseSwiftTreeDumpTest {
|
||||
|
||||
@Test
|
||||
public void testSimpleSwift() {
|
||||
void testSimpleSwift() {
|
||||
doTest("Simple");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBtree() {
|
||||
void testBtree() {
|
||||
doTest("BTree");
|
||||
}
|
||||
|
||||
|
@ -4,27 +4,24 @@
|
||||
|
||||
package net.sourceforge.pmd.lang.swift.ast;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
|
||||
import net.sourceforge.pmd.lang.ast.test.BaseParsingHelper;
|
||||
import net.sourceforge.pmd.lang.swift.SwiftLanguageModule;
|
||||
import net.sourceforge.pmd.lang.swift.ast.SwiftParser.SwTopLevel;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class SwiftParsingHelper extends BaseParsingHelper<SwiftParsingHelper, SwTopLevel> {
|
||||
|
||||
public static final SwiftParsingHelper DEFAULT = new SwiftParsingHelper(Params.getDefault());
|
||||
|
||||
|
||||
public SwiftParsingHelper(@NotNull Params params) {
|
||||
public SwiftParsingHelper(@NonNull Params params) {
|
||||
super(SwiftLanguageModule.NAME, SwTopLevel.class, params);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NonNull
|
||||
@Override
|
||||
protected SwiftParsingHelper clone(@NotNull Params params) {
|
||||
protected SwiftParsingHelper clone(@NonNull Params params) {
|
||||
return new SwiftParsingHelper(params);
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.swift.rule.bestpractices;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
public class ProhibitedInterfaceBuilderTest extends PmdRuleTst {
|
||||
class ProhibitedInterfaceBuilderTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.swift.rule.bestpractices;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
public class UnavailableFunctionTest extends PmdRuleTst {
|
||||
class UnavailableFunctionTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.swift.rule.errorprone;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
public class ForceCastTest extends PmdRuleTst {
|
||||
class ForceCastTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ package net.sourceforge.pmd.lang.swift.rule.errorprone;
|
||||
|
||||
import net.sourceforge.pmd.testframework.PmdRuleTst;
|
||||
|
||||
public class ForceTryTest extends PmdRuleTst {
|
||||
class ForceTryTest extends PmdRuleTst {
|
||||
// no additional unit tests
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user