Commit 82cd123e authored by Alexander Ryndin's avatar Alexander Ryndin
Browse files

Merge remote-tracking branch 'origin/master' into ryndin

parents 1bb6cdc3 0d7e4910
......@@ -45,7 +45,7 @@ jobs:
- checkout
# run tests!
- run: mvn clean install --settings "settings.xml"
- run: mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings "settings.xml"
workflows:
version: 2
commit-workflow:
......
......@@ -248,6 +248,35 @@ public class ExpandedComponentInstanceTest extends AbstractSymtabTest {
result = InstanceInformation.getInstanceNumberFromASTSubComponent(csInner.getInstanceInformation().get().getASTSubComponent(), 1);
assertEquals(3, result);
}
@Test
public void testConnectorCorrectness() {
Scope symTab = createSymTab("src/test/resources");
ExpandedComponentInstanceSymbol inst = symTab.<ExpandedComponentInstanceSymbol>resolve(
"testing.subComponentConnector", ExpandedComponentInstanceSymbol.KIND).orElse(null);
assertNotNull(inst);
testConnectorCorrectnessForComponent(inst);
}
private void testConnectorCorrectnessForComponent(ExpandedComponentInstanceSymbol inst) {
inst.getConnectors().forEach(connectorSymbol -> {
assertNotNull(connectorSymbol.getSourcePort());
assertNotNull(connectorSymbol.getTargetPort());
PortSymbol sourcePort = connectorSymbol.getSourcePort();
PortSymbol targetPort = connectorSymbol.getTargetPort();
System.out.println("source: " + sourcePort.getFullName());
System.out.println("target: " + targetPort.getFullName() + "\n");
assertNotEquals(sourcePort.getFullName(), targetPort.getFullName());
});
inst.getSubComponents().forEach(this::testConnectorCorrectnessForComponent);
}
/*
@Test
public void testGenericInstance() throws Exception {
......
package testing;
component A {
port
in Boolean in1,
out Boolean out1;
component SubA {
port
in Boolean in1,
out Boolean out1;
}
instance SubA subA;
connect in1 -> subA.in1;
connect subA.out1 -> out1;
}
\ No newline at end of file
package testing;
component SubComponentConnector{
port
in Boolean in1,
out Boolean out1;
instance A a;
connect in1 -> a.in1;
connect a.out1 -> out1;
}
\ No newline at end of file
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