Loading ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that list notation containing actual parameters in wrong order is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: // When using list notation, the order of elements in the actual parameter list shall // be the same as their order in the corresponding formal parameter list. module NegSem_050402_actual_parameters_100 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_100() runs on GeneralComp { f_test("test", 1); } control { execute(TC_NegSem_050402_actual_parameters_100()); } } ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that list notation containing less actual parameters than required is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: // For each formal parameter without a default there shall be an actual parameter. module NegSem_050402_actual_parameters_101 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1) { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_101() runs on GeneralComp { f_test(1); } control { execute(TC_NegSem_050402_actual_parameters_101()); } } ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that parameter without default value cannot be skipped ** @verdict pass reject ***************************************************/ // The following requirement is tested: // For each formal parameter without a default there shall be an actual parameter. module NegSem_050402_actual_parameters_102 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1) { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_102() runs on GeneralComp { f_test(1, -); } control { execute(TC_NegSem_050402_actual_parameters_102()); } } ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: // Either list notation or assignment notation shall be used in a single parameter // list. They shall not be mixed. module NegSem_050402_actual_parameters_103 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_103() runs on GeneralComp { f_test(p_val1 := 1, "test"); } control { execute(TC_NegSem_050402_actual_parameters_103()); } } ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: // Either list notation or assignment notation shall be used in a single parameter // list. They shall not be mixed. module NegSem_050402_actual_parameters_104 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2 := "test") { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_104() runs on GeneralComp { f_test(p_val1 := 1, -); } control { execute(TC_NegSem_050402_actual_parameters_104()); } } Loading
ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_100.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that list notation containing actual parameters in wrong order is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: // When using list notation, the order of elements in the actual parameter list shall // be the same as their order in the corresponding formal parameter list. module NegSem_050402_actual_parameters_100 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_100() runs on GeneralComp { f_test("test", 1); } control { execute(TC_NegSem_050402_actual_parameters_100()); } }
ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_101.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that list notation containing less actual parameters than required is not accepted ** @verdict pass reject ***************************************************/ // The following requirement is tested: // For each formal parameter without a default there shall be an actual parameter. module NegSem_050402_actual_parameters_101 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1) { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_101() runs on GeneralComp { f_test(1); } control { execute(TC_NegSem_050402_actual_parameters_101()); } }
ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_102.ttcn 0 → 100644 +28 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that parameter without default value cannot be skipped ** @verdict pass reject ***************************************************/ // The following requirement is tested: // For each formal parameter without a default there shall be an actual parameter. module NegSem_050402_actual_parameters_102 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1) { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_102() runs on GeneralComp { f_test(1, -); } control { execute(TC_NegSem_050402_actual_parameters_102()); } }
ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (value as actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: // Either list notation or assignment notation shall be used in a single parameter // list. They shall not be mixed. module NegSem_050402_actual_parameters_103 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2) { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_103() runs on GeneralComp { f_test(p_val1 := 1, "test"); } control { execute(TC_NegSem_050402_actual_parameters_103()); } }
ATS/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn 0 → 100644 +29 −0 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.2, verify that mixing list and assignment notation is not allowed in parameterized calls (skipped actual parameter) ** @verdict pass reject ***************************************************/ // The following requirement is tested: // Either list notation or assignment notation shall be used in a single parameter // list. They shall not be mixed. module NegSem_050402_actual_parameters_104 { type component GeneralComp { } function f_test (integer p_val1, charstring p_val2 := "test") { if (p_val1 == 1 and p_val2 == "test") { setverdict(pass); } else { setverdict(fail); } } testcase TC_NegSem_050402_actual_parameters_104() runs on GeneralComp { f_test(p_val1 := 1, -); } control { execute(TC_NegSem_050402_actual_parameters_104()); } }