Commit cac595f7 authored by Nils Kaminski's avatar Nils Kaminski
Browse files

Refactor emad tests

parent bd4bd06c
Pipeline #87043 failed with stage
in 30 seconds
......@@ -17,8 +17,8 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicTestEvent extends AbstractSymtabTest {
public class DynamicEventTest extends AbstractSymtabTest {
@BeforeClass
public static void setUp() {
......@@ -28,9 +28,8 @@ public class DynamicTestEvent extends AbstractSymtabTest {
}
@Test
@Ignore
public void Test_00_TestTrueEvent(){
test("event.test00.test00", "./target/generated-sources-cpp/dynamics-event/test00");
test("event.test00.test00", "./target/generated-sources-cpp/dynamics/event/test00");
}
......
......@@ -31,7 +31,7 @@ public class DynamicGenerationTest extends AbstractSymtabTest {
assertNotNull(componentSymbol);
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/Test_01_TestDynamic1");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/test/Test_01_TestDynamic1");
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
......@@ -44,7 +44,7 @@ public class DynamicGenerationTest extends AbstractSymtabTest {
assertNotNull(componentSymbol);
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/Test_02_TestEventComponent1");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/test/Test_02_TestEventComponent1");
generatorCPP.setGenerateCMake(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
......@@ -58,7 +58,7 @@ public class DynamicGenerationTest extends AbstractSymtabTest {
assertNotNull(componentSymbol);
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/Test_03_TestEventComponent2");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/test/Test_03_TestEventComponent2");
generatorCPP.setGenerateCMake(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
......
......@@ -6,9 +6,7 @@ import de.monticore.lang.monticar.generator.cpp.GeneratorCPP;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import de.se_rwth.commons.logging.Log;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import java.io.File;
import java.io.IOException;
......@@ -16,8 +14,8 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicIsConnectedInMath extends AbstractSymtabTest {
public class DynamicIsConnectedInMathTest extends AbstractSymtabTest {
@BeforeClass
public static void setUp() {
......@@ -35,9 +33,10 @@ public class DynamicIsConnectedInMath extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics-isconnected/test00");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/isconnected/test00");
// generatorCPP.setUseThreadingOptimization(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
@Test
......@@ -49,9 +48,10 @@ public class DynamicIsConnectedInMath extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics-isconnected/test01");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/isconnected/test01");
// generatorCPP.setUseThreadingOptimization(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
@Test
......@@ -63,8 +63,9 @@ public class DynamicIsConnectedInMath extends AbstractSymtabTest {
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics-isconnected/test02");
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/isconnected/test02");
// generatorCPP.setUseThreadingOptimization(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
}
......@@ -16,28 +16,27 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicPortConnectDynamicInstanceTest extends AbstractSymtabTest {
@Test
public void Test_00_Test1() throws IOException {
test("instanceRequest.test1", "./target/generated-sources-cpp/dynamics/DynamicPortConnectDynamicInstanceTest_Test_00_Test1");
test("instanceRequest.test1", "./target/generated-sources-cpp/dynamics/instances/test00");
}
@Test
public void Test_02_Test2() throws IOException {
test("instanceRequest.test2", "./target/generated-sources-cpp/dynamics/DynamicPortConnectDynamicInstanceTest_Test_02_Test2");
test("instanceRequest.test2", "./target/generated-sources-cpp/dynamics/instances/test02");
}
@Test
public void Test_03_Test3() throws IOException {
test("instanceRequest.test3", "./target/generated-sources-cpp/dynamics/DynamicPortConnectDynamicInstanceTest_Test_03_Test3");
test("instanceRequest.test3", "./target/generated-sources-cpp/dynamics/instances/test03");
}
@Test
@Ignore
public void Test_04_Big() throws IOException {
test("instanceRequest.testBig", "./target/generated-sources-cpp/dynamics/DynamicPortConnectDynamicInstanceTest_Test_04_Big");
test("instanceRequest.testBig", "./target/generated-sources-cpp/dynamics/instances/test04");
}
protected void test(String instName, String target){
......
......@@ -16,7 +16,7 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicPortConnectionGenerationTest extends AbstractSymtabTest {
protected String path(){
......@@ -32,37 +32,37 @@ public class DynamicPortConnectionGenerationTest extends AbstractSymtabTest {
@Test
public void Test_00_Exec() throws IOException {
test("execOrder.not", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_00_Exec");
test("execOrder.not", "./target/generated-sources-cpp/dynamics/port-connect/test00");
}
@Test
public void Test_01_Not() throws IOException {
test("portRequest.not", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_01_Not");
test("portRequest.not", "./target/generated-sources-cpp/dynamics/port-connect/test010");
}
@Test
public void Test_02_PortRequest1() throws IOException {
test("portRequest.portRequest1", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_02_PortRequest1");
test("portRequest.portRequest1", "./target/generated-sources-cpp/dynamics/port-connect/test02_1");
}
@Test
public void Test_02_PortRequest2() throws IOException {
test("portRequest.portRequest2", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_02_PortRequest2");
test("portRequest.portRequest2", "./target/generated-sources-cpp/dynamics/port-connect/test02_2");
}
@Test
public void Test_03_PortRequest3() throws IOException {
test("portRequest.portRequest3", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_03_PortRequest3");
test("portRequest.portRequest3", "./target/generated-sources-cpp/dynamics/port-connect/test03");
}
@Test
public void Test_04_PortRequest4() throws IOException {
test("portRequest.portRequest4", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_04_PortRequest4");
test("portRequest.portRequest4", "./target/generated-sources-cpp/dynamics/port-connect/test04");
}
@Test
public void Test_05_PortRequest5() throws IOException {
test("portRequest.portRequest5", "./target/generated-sources-cpp/dynamics/DynamicPortConnectionGenerationTest_Test_05_PortRequest5");
test("portRequest.portRequest5", "./target/generated-sources-cpp/dynamics/port-connect/test05");
}
protected void test(String instName, String target){
......
......@@ -16,7 +16,7 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicsPortFreeTest extends AbstractSymtabTest {
protected String path(){
......@@ -32,22 +32,22 @@ public class DynamicsPortFreeTest extends AbstractSymtabTest {
@Test
public void Test_00_BasicFree() throws IOException {
test("free.free", "./target/generated-sources-cpp/dynamics-free/test00");
test("free.free", "./target/generated-sources-cpp/dynamics/free/test00");
}
@Test
public void Test_01_SetFree() throws IOException {
test("free.freeSetOnValue", "./target/generated-sources-cpp/dynamics-free/test01");
test("free.freeSetOnValue", "./target/generated-sources-cpp/dynamics/free/test01");
}
@Test
public void Test_02_OutFree() throws IOException {
test("free.outerFree", "./target/generated-sources-cpp/dynamics-free/test02");
test("free.outerFree", "./target/generated-sources-cpp/dynamics/free/test02");
}
@Test
public void Test_03_OutFree2() throws IOException {
test("free.outerFree2", "./target/generated-sources-cpp/dynamics-free/test03");
test("free.outerFree2", "./target/generated-sources-cpp/dynamics/free/test03");
}
protected void test(String instName, String target){
......
......@@ -38,7 +38,7 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class EMAGenerationTest {
public static TaggingResolver createSymTabAndTaggingResolver(String... modelPath) {
......@@ -98,7 +98,7 @@ public class EMAGenerationTest {
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/ema/test01");
generatorCPP.setGenerateCMake(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
// files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
......@@ -113,6 +113,6 @@ public class EMAGenerationTest {
generatorCPP.setGenerationTargetPath("./target/generated-sources-cpp/dynamics/ema/test02");
generatorCPP.setGenerateCMake(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
// files.stream().forEach(f -> System.out.println("Generated: "+f.getName()));
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment