Commit 0ce3a932 authored by zeiss's avatar zeiss
Browse files

ATS structure

parent b4b38414
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 380     
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.1 Identifiers and keywords                     
 *****************************************************************/
module NegSem_0501_Identifier_001 {

type component GeneralComp {	    	    
}	

/****************************************************************************
 ** @desc     Negative test!
 ** @config   General config, MTC: GeneralComp
 ** @purpose  Ensure that cannot pass a charstring value to an integer variable.
 ** @verdict  Negative test! No verdict!
 ***************************************************************************/
testcase TC_NegSem_0501_Identifier_001() runs on GeneralComp {
    var integer v_i := "wrong_type";     
}			

control{
    execute(TC_NegSem_0501_Identifier_001());
}

}
+25 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 380     
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.1 Identifiers and keywords                     
 *****************************************************************/
module NegSyn_0501_Identifier_001 {

type component GeneralComp {	    	    
}	

/****************************************************************************
 ** @desc     Negative test!
 ** @config   General config, MTC: GeneralComp
 ** @purpose  Ensure that TTCN-3 reserved world cannot be an identifier.
 ** @verdict  Negative test! No verdict!
 ***************************************************************************/
testcase TC_NegSyn_0501_Identifier_001() runs on GeneralComp {
    var integer component := 1;     
}			

control{
    execute(TC_NegSyn_0501_Identifier_001());
}

}
+30 −0
Original line number Diff line number Diff line
/*****************************************************************
 ** @author   STF 380     
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.1 Identifiers and keywords                     
 *****************************************************************/
module Syn_0501_Identifier_001 {

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

/****************************************************************************
 ** @config   General config, MTC: IdComp
 ** @purpose  Ensure that the IUT handle the identifiers case sensitively.
 ***************************************************************************/
testcase TC_Syn_0501_Identifier_001() runs on IdComp {
    const integer C_INT := 1;
    if (c_int == 0){		
        setverdict(pass);
    }
    else {
        setverdict(fail);
    }		
}			

control{
    execute(TC_Syn_0501_Identifier_001());
}

}
+28 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 380 
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.2 Scope rules                     
 ***************************************************/
module Sem_0502_Scope_001 {

type component GeneralComp {	    	    
    const integer c_int := 0;
}	

/**********************************************************************************
 ** @config   General config, MTC: GeneralComp
 ** @purpose  Ensure that the IUT handle scope hieararchy of component constants.
 **********************************************************************************/
testcase TC_Sem_0502_Scope_001() runs on GeneralComp {
    if (c_int == 0){
	setverdict(pass);
    }
    else {
        setverdict(fail);
    }		
}	

control{  
    execute(TC_Sem_0502_Scope_001());
}
}
+44 −0
Original line number Diff line number Diff line
/***************************************************
 ** @author   STF 380 
 ** @version  0.0.1
 ** @desc     Test cases for clause 5.2 Scope rules                     
 ***************************************************/
module Sem_0502_Scope_002 {

type component GeneralComp {	    	    
    var boolean vc_bool := false;
}	

/*********************************************************************************
 ** @config   General config, MTC: GeneralComp
 ** @purpose  Ensure that the IUT handle scope hieararchy with component booleans.
 *********************************************************************************/
testcase TC_Sem_0502_Scope_002() runs on GeneralComp {
    if (vc_bool == false){
	vc_bool := true;
	setverdict(pass);
    }
    else {
        setverdict(fail);
    }		
}
/*********************************************************************************************
 ** @desc     Test case TC_Sem_0502_Scope_002 shall not effect of the value of boolean vc_bool
 ** @config   General config, MTC: GeneralComp
 ** @purpose  Ensure that the IUT handle scope hieararchy with component booleans.
 ********************************************************************************************/
testcase TC_Sem_0502_Scope_003() runs on GeneralComp {	    
    if (vc_bool == false){
	setverdict(pass);
    }
    else {
        setverdict(fail);
    }		
}

control{  
    execute(TC_Sem_0502_Scope_002());
    execute(TC_Sem_0502_Scope_003());
}

}
Loading