Commit cf5c5783 authored by stancakapost's avatar stancakapost
Browse files

added tests

parent 84dd020d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,4 +16,4 @@ ttcn3.save_log_automatically=false
ttcn3.source_folders=//PROJECT_NAME//ttcn3\n//PROJECT_NAME//ttcn3/Pos_060301_integer_001\n//PROJECT_NAME//ttcn3/Pos_060108_maxinclusive_001
ttcn3.tlz.output_folder=
ttcn3.use_bigint=false
ttcn3.use_destination_path_for_ttcn3view=false
ttcn3.use_destination_path_for_ttcn3view=true
+13 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE campaignloader PUBLIC "-//TESTING TECH//DTD MLF//2.0" "mlf.dtd">
<campaignloader>
  <campaign Name="Pos_060108_maxinclusive_001" Control="false">
    <testadapter Name="com.testingtech.ttcn.tri.PluginTestAdapter" File="">
      <description></description>
    </testadapter>
    <module Name="Pos_060108_maxinclusive_001" File="ttcn3/Pos_060108_maxinclusive_001/Pos_060108_maxinclusive_001.jar" Package="generated_ttcn"/>
    <testcase Name="TC_Pos_060108_maxinclusive_001" Alias="" Module="Pos_060108_maxinclusive_001" Retries="0" Runs="1" ActionOnFail="continue" Selection="false" Status="stopped" Verdict="fail">
      <description></description>
    </testcase>
  </campaign>
</campaignloader>
+13 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE campaignloader PUBLIC "-//TESTING TECH//DTD MLF//2.0" "mlf.dtd">
<campaignloader>
  <campaign Name="Pos_060301_integer_001" Control="false">
    <testadapter Name="com.testingtech.ttcn.tri.PluginTestAdapter" File="">
      <description></description>
    </testadapter>
    <module Name="Pos_060301_integer_001" File="ttcn3/Pos_060301_integer_001/Pos_060301_integer_001.jar" Package="generated_ttcn"/>
    <testcase Name="TC_Pos_060301_integer_001" Alias="" Module="Pos_060301_integer_001" Retries="0" Runs="1" ActionOnFail="continue" Selection="false" Status="stopped" Verdict="fail">
      <description></description>
    </testcase>
  </campaign>
</campaignloader>
+54 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 475
 ** @version  0.0.1
 ** @purpose  9:6.1.8, Verify mapping of elements of type integer with maxInclusive facet
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
module Pos_060108_maxinclusive_001 {

    import from schema_Pos_060108_maxinclusive_001 language "XSD" all;

    template E1el m_msg := 100;


    type universal charstring Raw;
    type port P message {
        inout all;
    }
    type component C {
        port P p;
    }

    external function matchFile(Raw p_textToMatch, charstring p_filePath, out charstring p_matchError) return boolean;

    testcase TC_Pos_060108_maxinclusive_001() runs on C system C {
        var Raw v_rcv;
        var charstring v_matchError;
        map(self:p, system:p);
        p.send(m_msg);
        alt {
            []	p.check(receive(Raw:?) -> value v_rcv) {
                if (matchFile(v_rcv, "Pos_060108_maxinclusive_001.xml", v_matchError)) {
                    alt {
                        [] p.receive(m_msg) {
                            setverdict(pass);
                        }
                        [] p.receive {
                            setverdict(fail, "XML decoding failure");
                        }
                    }
                } else {
                    setverdict(fail, v_matchError);
                }
            }
            [] p.receive {
                setverdict(fail, "Raw decoding failure");
            }
        }
    }

    control {
        execute(TC_Pos_060108_maxinclusive_001(), 5.0);
    }

}
+4 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<e1el
    xmlns="schema:Pos_060108_maxinclusive_001"
>100</e1el>
Loading