only: reducing junit4
This commit is contained in:
parent
0a45e6c507
commit
c071074475
|
@ -7,7 +7,7 @@ apply from: '../../java_tools/dependencies.gradle'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api project(':ecu_io')
|
api project(':ecu_io')
|
||||||
implementation global_libs.junit
|
implementation global_libs.junit4
|
||||||
}
|
}
|
||||||
|
|
||||||
task simulatorFunctionalTestLauncherWithSimulator(type: Exec) {
|
task simulatorFunctionalTestLauncherWithSimulator(type: Exec) {
|
||||||
|
@ -24,4 +24,4 @@ task simulatorFunctionalTestLauncherAssumungSimulatorWasStartedExternally(type:
|
||||||
description = "Run the main class with ExecTask"
|
description = "Run the main class with ExecTask"
|
||||||
workingDir = rootProject.projectDir
|
workingDir = rootProject.projectDir
|
||||||
commandLine "java", "-classpath", sourceSets.main.runtimeClasspath.getAsPath(), "com.rusefi.SimulatorFunctionalTestLauncher"
|
commandLine "java", "-classpath", sourceSets.main.runtimeClasspath.getAsPath(), "com.rusefi.SimulatorFunctionalTestLauncher"
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import static com.rusefi.TestHelper.assertLatch;
|
import static com.rusefi.TestHelper.assertLatch;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
public class TcpCommunicationIntegrationTest {
|
public class TcpCommunicationIntegrationTest {
|
||||||
// todo: implement & test TCP connector restart!
|
// todo: implement & test TCP connector restart!
|
||||||
|
|
|
@ -7,7 +7,6 @@ import com.rusefi.ldmp.StateDictionary;
|
||||||
import com.rusefi.ui.livedata.SourceCodePainter;
|
import com.rusefi.ui.livedata.SourceCodePainter;
|
||||||
import com.rusefi.ui.livedata.VariableValueSource;
|
import com.rusefi.ui.livedata.VariableValueSource;
|
||||||
import org.antlr.v4.runtime.tree.ParseTree;
|
import org.antlr.v4.runtime.tree.ParseTree;
|
||||||
import org.junit.Ignore;
|
|
||||||
import org.junit.jupiter.api.Disabled;
|
import org.junit.jupiter.api.Disabled;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
@ -16,7 +15,7 @@ import java.net.URISyntaxException;
|
||||||
|
|
||||||
import static com.rusefi.livedata.LiveDataParserPanel.getParseTree;
|
import static com.rusefi.livedata.LiveDataParserPanel.getParseTree;
|
||||||
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
|
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
public class LiveDataConventionTest {
|
public class LiveDataConventionTest {
|
||||||
@Test
|
@Test
|
||||||
|
@ -41,12 +40,12 @@ public class LiveDataConventionTest {
|
||||||
|
|
||||||
|
|
||||||
String sourceCode = LiveDataParserPanel.getContent(LiveDataParserPanel.class, fileName);
|
String sourceCode = LiveDataParserPanel.getContent(LiveDataParserPanel.class, fileName);
|
||||||
assertTrue("No content " + fileName + " size=" + sourceCode.length(), sourceCode.length() > 100);
|
assertTrue(sourceCode.length() > 100, "No content " + fileName + " size=" + sourceCode.length());
|
||||||
|
|
||||||
ParseTree tree = getParseTree(sourceCode);
|
ParseTree tree = getParseTree(sourceCode);
|
||||||
ParseResult parseResult = CodeWalkthrough.applyVariables(valueSource, sourceCode, SourceCodePainter.VOID, tree);
|
ParseResult parseResult = CodeWalkthrough.applyVariables(valueSource, sourceCode, SourceCodePainter.VOID, tree);
|
||||||
|
|
||||||
assertTrue("Broken live data constraint in " + fileName + ": " + parseResult.geBrokenConditions(), parseResult.geBrokenConditions().isEmpty());
|
assertTrue(parseResult.geBrokenConditions().isEmpty(), "Broken live data constraint in " + fileName + ": " + parseResult.geBrokenConditions());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.rusefi.ui;
|
||||||
import neoe.formatter.lua.LuaFormatter;
|
import neoe.formatter.lua.LuaFormatter;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
public class LuaFormatterTest {
|
public class LuaFormatterTest {
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -14,8 +14,8 @@ import java.net.URISyntaxException;
|
||||||
|
|
||||||
import static com.rusefi.livedata.LiveDataParserPanel.getContentOrNull;
|
import static com.rusefi.livedata.LiveDataParserPanel.getContentOrNull;
|
||||||
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
|
import static com.rusefi.ui.LiveDataPane.CPP_SUFFIX;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
@Ignore // todo: https://github.com/rusefi/rusefi/issues/4669
|
@Ignore // todo: https://github.com/rusefi/rusefi/issues/4669
|
||||||
public class LiveDataColorTest {
|
public class LiveDataColorTest {
|
||||||
|
@ -40,7 +40,7 @@ public class LiveDataColorTest {
|
||||||
|
|
||||||
private void testSpecificFile(String fileName) throws IOException {
|
private void testSpecificFile(String fileName) throws IOException {
|
||||||
String sourceCode = getContentOrNull(getClass(), fileName);
|
String sourceCode = getContentOrNull(getClass(), fileName);
|
||||||
assertNotNull("Not found: sourceCode for " + fileName, sourceCode);
|
assertNotNull(sourceCode, "Not found: sourceCode for " + fileName);
|
||||||
|
|
||||||
ParseTree tree = LiveDataParserPanel.getParseTree(sourceCode);
|
ParseTree tree = LiveDataParserPanel.getParseTree(sourceCode);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import org.junit.jupiter.api.Test;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||||
|
|
||||||
public class SourceReaderTest {
|
public class SourceReaderTest {
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -2,7 +2,7 @@ package com.rusefi.ui.lua;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
public class LuaImportsTest {
|
public class LuaImportsTest {
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -9,7 +9,6 @@ allprojects {
|
||||||
plugins.withType(JavaPlugin) {
|
plugins.withType(JavaPlugin) {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation global_libs.annotations
|
implementation global_libs.annotations
|
||||||
testImplementation global_libs.junit
|
|
||||||
testImplementation global_libs.junit5
|
testImplementation global_libs.junit5
|
||||||
testImplementation global_libs.junit5engine
|
testImplementation global_libs.junit5engine
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ shadowJar {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
exclude(dependency(global_libs.jsr305))
|
exclude(dependency(global_libs.jsr305))
|
||||||
exclude(dependency(global_libs.junit))
|
|
||||||
exclude(dependency(global_libs.annotations))
|
exclude(dependency(global_libs.annotations))
|
||||||
exclude(dependency('com.ibm.icu:icu4j:.*'))
|
exclude(dependency('com.ibm.icu:icu4j:.*'))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
ext {
|
ext {
|
||||||
global_libs = [
|
global_libs = [
|
||||||
junit : "junit:junit:4.13.2",
|
junit4 : "junit:junit:4.13.2",
|
||||||
junit5 : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
|
junit5 : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
|
||||||
junit5engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
|
junit5engine : "org.junit.jupiter:junit-jupiter-engine:$junit5Version",
|
||||||
junit5api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
|
junit5api : "org.junit.jupiter:junit-jupiter-api:$junit5Version",
|
||||||
|
|
|
@ -24,7 +24,6 @@ shadowJar {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
exclude(dependency(global_libs.jsr305))
|
exclude(dependency(global_libs.jsr305))
|
||||||
exclude(dependency(global_libs.junit))
|
|
||||||
exclude(dependency(global_libs.annotations))
|
exclude(dependency(global_libs.annotations))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ shadowJar {
|
||||||
dependencies in resulting jar
|
dependencies in resulting jar
|
||||||
*/
|
*/
|
||||||
dependencies {
|
dependencies {
|
||||||
exclude(dependency(global_libs.junit))
|
|
||||||
exclude(dependency(global_libs.annotations))
|
exclude(dependency(global_libs.annotations))
|
||||||
exclude(dependency(ts_plugin_libs.launcher_api))
|
exclude(dependency(ts_plugin_libs.launcher_api))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue