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

New Tests

parent 6f1e8f1b
Pipeline #84514 failed with stage
in 30 seconds
......@@ -10,6 +10,7 @@ import de.monticore.io.paths.ModelPath;
import de.monticore.lang.embeddedmontiarc.LogConfig;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarcmath._symboltable.EmbeddedMontiArcMathLanguage;
import de.monticore.lang.embeddedmontiarc.helper.ConstantPortHelper;
import de.monticore.lang.embeddedmontiarcdynamic.event._symboltable.EventLanguage;
import de.monticore.lang.monticar.enumlang._symboltable.EnumLangLanguage;
import de.monticore.lang.monticar.generator.cpp.converter.MathConverter;
import de.monticore.lang.monticar.generator.optimization.MathOptimizationRule;
......@@ -64,6 +65,7 @@ public class AbstractSymtab {
fam.addModelingLanguage(new StreamUnitsLanguage());
fam.addModelingLanguage(new StructLanguage());
fam.addModelingLanguage(new EnumLangLanguage());
fam.addModelingLanguage(new EventLanguage());
final ModelPath mp = new ModelPath();
for (String m : modelPath) {
mp.addEntry(Paths.get(m));
......
......@@ -5,8 +5,10 @@ import de.monticore.lang.monticar.generator.AbstractSymtabTest;
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.FixMethodOrder;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import java.io.File;
import java.io.IOException;
......@@ -14,6 +16,7 @@ import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicPortConnectDynamicInstanceTest extends AbstractSymtabTest {
@Test
......
package de.monticore.lang.monticar.generator.dynamics;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.monticar.generator.AbstractSymtabTest;
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.Ignore;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import java.io.File;
import java.io.IOException;
import java.util.List;
import static org.junit.Assert.assertNotNull;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DynamicTestEvent extends AbstractSymtabTest {
@BeforeClass
public static void setUp() {
// ensure an empty log
Log.getFindings().clear();
Log.enableFailQuick(false);
}
@Test
@Ignore
public void Test_00_TestTrueEvent(){
test("event.test00.test00", "./target/generated-sources-cpp/dynamics-event/test00");
}
protected void test(String instName, String target){
try {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/dynamics");
EMAComponentInstanceSymbol componentSymbol = symtab.<EMAComponentInstanceSymbol>resolve(instName, EMAComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(componentSymbol);
GeneratorCPP generatorCPP = new GeneratorCPP();
generatorCPP.useArmadilloBackend();
generatorCPP.setGenerationTargetPath(target);
// generatorCPP.setUseThreadingOptimization(true);
List<File> files = generatorCPP.generateFiles(symtab, componentSymbol, symtab);
}catch (IOException ex){
ex.printStackTrace();
Log.error(ex.getMessage());
}
}
}
package event.test00;
component Test00 {
ports
out B output;
@ TrueEvent(){
connect true -> output;
}
}
\ No newline at end of file
package event.test00;
event TrueEvent {
true
}
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