Loading ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn +25 −17 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 /***************************************************************** ** @author STF 521 ** @version 0.0.1 ** @purpose 1:5.4.1.1, verify that incompatible value in default value assignment of value formal parameters causes error ** @purpose 1:5.4.1.1, Verify that functions with port parameters cannot be used in component.start operation ** @verdict pass reject ***************************************************/ *****************************************************************/ // The following requirement is tested: // Restriction e) // The expression of the formal parameters' default value had to be compatible with the type of the parameter. // Only function and altstep definitions may have formal port parameters, - with the exception of functions or // altsteps started as test component behaviour (see clause 21.3.2). module NegSem_05040101_parameters_of_kind_value_007 { type component GeneralComp { } module NegSem_05040104_parameters_of_kind_port_001 { function f(in integer p_int := 5.0) { type port P message { inout integer } type component C { port P p; } testcase TC_NegSem_05040101_parameters_of_kind_value_007() runs on GeneralComp { f(); function f_test(P p_port) runs on C { p_port.send(1); setverdict(pass); } testcase TC_NegSem_05040104_parameters_of_kind_port_001() runs on C system C { var C v_ptc := C.create; v_ptc.start(f_test(p)); v_ptc.done; } control { execute(TC_NegSem_05040101_parameters_of_kind_value_007()); execute(TC_NegSem_05040104_parameters_of_kind_port_001()); } } No newline at end of file ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ // The following requirement is tested: // Restriction b) // Formal value parameters of templates ... shall always be in parameters. // Formal template parameters of templates ... shall always be in parameters. module NegSem_05040102_parameters_of_kind_template_004 { type component GeneralComp { Loading ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn +3 −3 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) ** @purpose 1:5.4.2, verify that assignment notation followed by list 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. // Actual parameters can be provided ... in a mixed notation where the first parameters are given in list notation // and additional parameters in assignment notation. module NegSem_050402_actual_parameters_103 { Loading ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn +3 −3 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) ** @purpose 1:5.4.2, verify that assignment notation followed by list 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. // Actual parameters can be provided ... in a mixed notation where the first parameters are given in list notation // and additional parameters in assignment notation. module NegSem_050402_actual_parameters_104 { Loading ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn +4 −4 Original line number Diff line number Diff line /*************************************************** ** @author STF 521 ** @author STF 521, updated by STF 572 ** @version 0.0.1 ** @purpose 1:6.1.1.1, Access bitstring elements ** @verdict pass reject Loading @@ -16,9 +16,9 @@ module NegSem_06010101_AccessStringElements_001 { type component GeneralComp {} testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { var octetstring v_b := '100010'O; v_b[1] := '11'O; //error: only individual elements can be accessed if (v_b == '100001'O){ var bitstring v_b := '100010'B; v_b[1] := '11'B; //error: only individual elements can be accessed if (v_b == '100001'B){ setverdict(pass); } else { Loading Loading
ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/NegSem_05040101_parameters_of_kind_value_018.ttcn +25 −17 Original line number Diff line number Diff line /*************************************************** ** @author STF 487 /***************************************************************** ** @author STF 521 ** @version 0.0.1 ** @purpose 1:5.4.1.1, verify that incompatible value in default value assignment of value formal parameters causes error ** @purpose 1:5.4.1.1, Verify that functions with port parameters cannot be used in component.start operation ** @verdict pass reject ***************************************************/ *****************************************************************/ // The following requirement is tested: // Restriction e) // The expression of the formal parameters' default value had to be compatible with the type of the parameter. // Only function and altstep definitions may have formal port parameters, - with the exception of functions or // altsteps started as test component behaviour (see clause 21.3.2). module NegSem_05040101_parameters_of_kind_value_007 { type component GeneralComp { } module NegSem_05040104_parameters_of_kind_port_001 { function f(in integer p_int := 5.0) { type port P message { inout integer } type component C { port P p; } testcase TC_NegSem_05040101_parameters_of_kind_value_007() runs on GeneralComp { f(); function f_test(P p_port) runs on C { p_port.send(1); setverdict(pass); } testcase TC_NegSem_05040104_parameters_of_kind_port_001() runs on C system C { var C v_ptc := C.create; v_ptc.start(f_test(p)); v_ptc.done; } control { execute(TC_NegSem_05040101_parameters_of_kind_value_007()); execute(TC_NegSem_05040104_parameters_of_kind_port_001()); } } No newline at end of file
ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSem_05040102_parameters_of_kind_template_004.ttcn +1 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,7 @@ // The following requirement is tested: // Restriction b) // Formal value parameters of templates ... shall always be in parameters. // Formal template parameters of templates ... shall always be in parameters. module NegSem_05040102_parameters_of_kind_template_004 { type component GeneralComp { Loading
ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_103.ttcn +3 −3 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) ** @purpose 1:5.4.2, verify that assignment notation followed by list 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. // Actual parameters can be provided ... in a mixed notation where the first parameters are given in list notation // and additional parameters in assignment notation. module NegSem_050402_actual_parameters_103 { Loading
ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/NegSem_050402_actual_parameters_104.ttcn +3 −3 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) ** @purpose 1:5.4.2, verify that assignment notation followed by list 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. // Actual parameters can be provided ... in a mixed notation where the first parameters are given in list notation // and additional parameters in assignment notation. module NegSem_050402_actual_parameters_104 { Loading
ATS/core_language/06_types_and_values/0601_basic_types_and_values/060101_basic_string_types_and_values/06010101_accessing_individual_string_elements/NegSem_06010101_AccessStringElements_001.ttcn +4 −4 Original line number Diff line number Diff line /*************************************************** ** @author STF 521 ** @author STF 521, updated by STF 572 ** @version 0.0.1 ** @purpose 1:6.1.1.1, Access bitstring elements ** @verdict pass reject Loading @@ -16,9 +16,9 @@ module NegSem_06010101_AccessStringElements_001 { type component GeneralComp {} testcase TC_NegSem_06010101_AccessStringElements_001() runs on GeneralComp { var octetstring v_b := '100010'O; v_b[1] := '11'O; //error: only individual elements can be accessed if (v_b == '100001'O){ var bitstring v_b := '100010'B; v_b[1] := '11'B; //error: only individual elements can be accessed if (v_b == '100001'B){ setverdict(pass); } else { Loading