Loading 05_basic_language_elements/0502_scope_rules/Sem_0502_Scope_008.ttcn +0 −4 Original line number Diff line number Diff line Loading @@ -11,10 +11,6 @@ type component GeneralComp { var integer v_component := 0; } type component GeneralComp { var integer v_component := 0; } function f_funcScope() runs on GeneralComp { var integer v_function := 0; } Loading 05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn 0 → 100755 +37 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that allowed orderings of declarations are supported ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_0503_Ordering_001 { type component GeneralComp { var integer v_component := 0; } testcase TC_Sem_0503_Ordering_001() runs on GeneralComp { var integer v_testcase := 0; f_function(); if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; setverdict(pass); } } } function f_function() runs on GeneralComp { var integer v_function := 0; } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_001()); } } 05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn 0 → 100755 +33 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_002 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function := 0; } testcase TC_Sem_0503_Ordering_002() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_nested_statement == 0) { //attempt to access an undefined variable var integer v_nested_statement := 0; } } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_002()); } } 05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_003.ttcn 0 → 100755 +34 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_003 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function := 0; } testcase TC_Sem_0503_Ordering_003() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; } var integer v_statement_2 := 0; //late declaration } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_003()); } } 05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_004.ttcn 0 → 100755 +35 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_004 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function; v_function := 0; var integer v_function_2 := 0; //late declaration } testcase TC_Sem_0503_Ordering_004() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; } } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_004()); } } Loading
05_basic_language_elements/0502_scope_rules/Sem_0502_Scope_008.ttcn +0 −4 Original line number Diff line number Diff line Loading @@ -11,10 +11,6 @@ type component GeneralComp { var integer v_component := 0; } type component GeneralComp { var integer v_component := 0; } function f_funcScope() runs on GeneralComp { var integer v_function := 0; } Loading
05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_001.ttcn 0 → 100755 +37 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that allowed orderings of declarations are supported ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module Sem_0503_Ordering_001 { type component GeneralComp { var integer v_component := 0; } testcase TC_Sem_0503_Ordering_001() runs on GeneralComp { var integer v_testcase := 0; f_function(); if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; setverdict(pass); } } } function f_function() runs on GeneralComp { var integer v_function := 0; } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_001()); } }
05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_002.ttcn 0 → 100755 +33 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_002 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function := 0; } testcase TC_Sem_0503_Ordering_002() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_nested_statement == 0) { //attempt to access an undefined variable var integer v_nested_statement := 0; } } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_002()); } }
05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_003.ttcn 0 → 100755 +34 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_003 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function := 0; } testcase TC_Sem_0503_Ordering_003() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; } var integer v_statement_2 := 0; //late declaration } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_003()); } }
05_basic_language_elements/0503_ordering_of_declarations/Sem_0503_Ordering_004.ttcn 0 → 100755 +35 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 409 ** @version 0.0.1 ** @desc Test cases for clause 5.2 Scope rules ** @purpose 1:5.3, Ensure that declarations are in the allowed ordering ** @verdict pass reject ***************************************************/ module Sem_0503_Ordering_004 { type component GeneralComp { var integer v_component := 0; } function f_function() runs on GeneralComp { var integer v_function; v_function := 0; var integer v_function_2 := 0; //late declaration } testcase TC_Sem_0503_Ordering_004() runs on GeneralComp { if(true) { var integer v_statement := 0; if (v_statement == 0) { var integer v_nested_statement := 0; } } } control { var integer v_control := 0; execute(TC_Sem_0503_Ordering_004()); } }