Commit 761dbb03 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ minor fixes for ttcn-3 generator

  + handle new default unassignedMemberTreatment
  + handle message keyword as identifier
  + handle action references without assigned component instance
parent 5f589842
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -462,7 +462,12 @@ operation TDL!Assertion execute() {
}

operation TDL!ActionReference execute() {
    //TODO: skip actions without componentInstance assigned (excluded by standard but still)
    var ci = self.componentInstance;
    if (ci.isUndefined()) {
        ("  Skipping ActionReference without ComponentInstance: "+self).log(1);
        return;
    }
    if (simulateSUT or ci.role = TDL!ComponentInstanceRole#Tester) {
        var sc = self.getMainContext(ci);
        var sb = stack.get(sc).last();
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ operation Any TTCNname() : String {
    ttcnName = ttcnName.replace("\\.","_");
    ttcnName = ttcnName.replace("\\^","");
    ttcnName = ttcnName.replace("value","value_");
    ttcnName = ttcnName.replace("message","message_");
    ttcnName = ttcnName.replace("^(\\d)","d$1");
    if (ttcnName = "integer" 
            or ttcnName = "charstring" 
+2 −1
Original line number Diff line number Diff line
@@ -793,6 +793,7 @@ rule StructuredDI2TD
    td.body = tb;

    if ((di.unassignedMember.isDefined()
           and not (di.unassignedMember = TDL!UnassignedMemberTreatment#undefined)
           and not di.dataType.allMembers().forAll(m|
                di.memberAssignment.exists(ma|ma.member = m)))
         //does it need to be recursive?