Commit 1ad90236 authored by Matthias Simon's avatar Matthias Simon
Browse files

Add initial ATS from TTCN3_PART1 and TTCN3_PART9 repositories

parent fd30c395
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:5.1, Ensure that cannot pass a charstring value to an integer variable.
 ** @verdict  pass reject
 *****************************************************************/
module NegSem_0501_Identifier_001 {

type component GeneralComp {
}

testcase TC_NegSem_0501_Identifier_001() runs on GeneralComp {
    var integer v_i := "wrong_type";
}

control{
    execute(TC_NegSem_0501_Identifier_001(), 1.0);
}

}
+20 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:5.1, Ensure that when the IUT loads a module containing an identifier named with a keyword then the module is rejected.
 ** @verdict  pass reject
 *****************************************************************/
module NegSyn_0501_Identifier_001 {

type component GeneralComp {
}

testcase TC_NegSyn_0501_Identifier_001() runs on GeneralComp {
    var integer component := 1;
}

control{
    execute(TC_NegSyn_0501_Identifier_001(), 1.0);
}

}
+28 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 409
 ** @version  0.0.1
 ** @purpose  1:5.1, Ensure that the IUT handle the identifiers case sensitively.
 ** @verdict  pass accept, ttcn3verdict:pass
 *****************************************************************/

module Syn_0501_Identifier_001 {

type component IdComp {
    const integer cl_int := 0;
}

testcase TC_Syn_0501_Identifier_001() runs on IdComp {
    const integer cl_iNT := 1;
    if ( match(cl_int, 0) ){
        setverdict(pass);
    }
    else {
        setverdict(fail);
    }
}

control{
    execute(TC_Syn_0501_Identifier_001(), 1.0);
}

}
+43 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 409
 ** @version  0.0.2
 ** @desc     Test cases for clause 5.2 Scope rules
 ** @purpose  1:5.2.1, Ensure that the IUT correctly handles scope of formal function parameters
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
module Sem_050201_Scope_of_parameters_001 {

type component GeneralComp {
}

function f_formalParameterScope_in(in integer p_myParameter) {
 p_myParameter := 1;
    if (p_myParameter == 1){
        setverdict(pass);
    }
    else {
        setverdict(fail);
    }
}


testcase TC_Sem_050201_Scope_of_parameters_001()  runs on GeneralComp  {

    var integer v_int := 0;
    f_formalParameterScope_in(v_int);

    if (v_int == 0) {
	setverdict(pass);
    }
    else {
        setverdict(fail);
    }
}


control{
    execute(TC_Sem_050201_Scope_of_parameters_001());

}

}
+38 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 451
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.2 Scope rules
 ** @purpose  1:5.2.1, Ensure that the IUT correctly handles scope of formal function parameters
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/
module Sem_050201_Scope_of_parameters_002 {

type component GeneralComp {
}


function f_formalParameterScope_inout(inout integer p_myParameter) {
 p_myParameter := 1;
}



testcase TC_Sem_050201_Scope_of_parameters_002()  runs on GeneralComp  {

    var integer v_int := 0;
    f_formalParameterScope_inout(v_int);

    if (v_int == 1) {
	setverdict(pass);
    }
    else {
        setverdict(fail);
    }
}


control{
    execute(TC_Sem_050201_Scope_of_parameters_002());
}

}
Loading