diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn index 2ae3d84447f78c66b13ff9e958b81f18086994fd..d3343a862ea0e5922100843755dcbcd0e1d468fe 100644 --- a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_002.ttcn @@ -3,7 +3,7 @@ ** @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 + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module NegSem_0503_Ordering_002 { diff --git a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn index 7287643118661e6d26511b79b172be8cc2818751..7ed21a704b76e88e4e6da689cfd33bbbea1affea 100644 --- a/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn +++ b/ATS/core_language/05_basic_language_elements/0503_ordering_of_declarations/NegSem_0503_Ordering_003.ttcn @@ -3,7 +3,7 @@ ** @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 + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module NegSem_0503_Ordering_003 { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_028.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_028.ttcn index 3f73483b690a0cfcb63fbf4894cc3bf3d0224ef1..d36c0a232885a2c250c6a6a19c9aaad6a6160e86 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_028.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_028.ttcn @@ -14,7 +14,7 @@ module Sem_05040101_parameters_of_kind_value_028 { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } type port TestPort message { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_032.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_032.ttcn index db979d0021a1fd03aa3a5dfcd1fc553ed2e35747..549cc5757f888cbae0f2cea562d73c1c7abecf02 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_032.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040101_parameters_of_kind_value/Sem_05040101_parameters_of_kind_value_032.ttcn @@ -15,7 +15,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } type port TestPort message { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn index 14c646d0efc4ff5e9e8714c2810ba5c29562298d..cec765592003cc2f5fdb5cd7c6433a536b6124d5 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/NegSyn_05040102_parameters_of_kind_template_001.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:5.4.1.2, verify that module parameter of template kind is not allowed - ** @verdict pass reject + ** @verdict pass accept, noexecution ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn index 900c429dae3f6fbd77505395621eb38788640ed9..561d7002917b10d272a8653062d5382b7f5f4bbe 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_001.ttcn @@ -14,7 +14,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } template MyRecord m_parametrizedTemplate diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn index 7a6dafc1e220510064b1765284ca638524d9f6c1..a49eff6b17a3d99dd9ecb472f0cce071d022348f 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_002.ttcn @@ -14,7 +14,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn index 009a4ae0ce5d2239da7ac729697de411f83e4c8e..350e141eb2a0153f8dccce53cd4e47b5e7318065 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_003.ttcn @@ -22,8 +22,8 @@ module Sem_05040102_parameters_of_kind_template_003 { type record R { - integer field1, - integer field2 + integer field1 optional, + integer field2 optional } template R mw_t(template integer p_int1, in template integer p_int2) := { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn index 1f84c386b327f80ea0a9e74ec7f3d6e16b10b49e..97346f1faa236bda18d047b9518cbcaf7e28fc51 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_004.ttcn @@ -22,8 +22,8 @@ module Sem_05040102_parameters_of_kind_template_004 { type record R { - integer field1, - integer field2 + integer field1 optional, + integer field2 optional } testcase TC_Sem_05040102_parameters_of_kind_template_004() runs on GeneralComp { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn index 4152f7ebe7a251ba9e5910ec6b1cb023fbc6536e..eae5e1584f5d81a3c953be5899a83b42b9004949 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_009.ttcn @@ -16,8 +16,8 @@ module Sem_05040102_parameters_of_kind_template_009 { type record R { - integer field1, - integer field2 + integer field1 optional, + integer field2 optional } template R mw_t(template integer p_int1 := ?, in template integer p_int2 := (0..5)) := { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn index a1bc23b66f1db706820817f16304ba3219d529b6..1239c61e23219ee51ee15b7cd3d7ce90a8a26413 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_010.ttcn @@ -16,8 +16,8 @@ module Sem_05040102_parameters_of_kind_template_010 { type record R { - integer field1, - integer field2 + integer field1 optional, + integer field2 optional } function f() { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn index 458ed45bc129c98b8427d1c6c392ca57f2b80e47..de0eb2429cfc1f329d93b1bde836448e4b787dca 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_014.ttcn @@ -17,8 +17,8 @@ module Sem_05040102_parameters_of_kind_template_014 { type record R { - integer field1, - integer field2 + integer field1 optional, + integer field2 optional } template R mw_t(template integer p_int1 := ?, in template integer p_int2 := (0..5)) := { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn index 19d93d031746fcc668b3305f8655d157608ad994..4ea985938edff399e4615b8916ff95d56f049bf6 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_015.ttcn @@ -17,7 +17,7 @@ module Sem_05040102_parameters_of_kind_template_015 { type record R { - integer field1, + integer field1 optional, integer field2 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn index 2d3a1a53aa4a64713b1df39454a9d7a5326e5dd0..ff54e2d67ada798f651e7cb1e7b1772befb0de29 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_016.ttcn @@ -17,7 +17,7 @@ module Sem_05040102_parameters_of_kind_template_016 { type record R { - integer field1, + integer field1 optional, integer field2 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn index eff5951d719dcd29a4362f557be3cebee90b96f1..a714f0df7754dbf9b8c7a6a75e6d1b7daf77c645 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_030.ttcn @@ -17,7 +17,7 @@ module Sem_05040102_parameters_of_kind_template_030 { type record R { - integer field1, + integer field1 optional, integer field2 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn index a9d1874b30d43141d1168947aa5ca59377233fa8..109dc28272d6fb97389ac2d1170795fc2ce0a01f 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040102_parameters_of_kind_template/Sem_05040102_parameters_of_kind_template_031.ttcn @@ -17,7 +17,7 @@ module Sem_05040102_parameters_of_kind_template_031 { type record R { - integer field1, + integer field1 optional, integer field2 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn index c774ec9460826cd39552239afad5249995aa4b9b..721cac3dc790d386adb9987a0a20ccfd02508a85 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/NegSyn_05040103_parameters_of_kind_timer_001.ttcn @@ -2,7 +2,7 @@ ** @author STF 521 ** @version 0.0.1 ** @purpose 1:5.4.1.3, Verify that in timer parameters are not allowed - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn index cda1d79542413dfc5086379144e7886058175009..ff176c35f004d44820806e91b3bbc78b2e289ddd 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_001.ttcn @@ -15,7 +15,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } type port TestPort message { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn index 50b9f7ac1e1d8e7a826c8955c6d447ac7212d676..708d4c44084b38398813946629dbb6f93ddda1e3 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040103_parameters_of_kind_timer/Sem_05040103_parameters_of_kind_timer_002.ttcn @@ -20,8 +20,9 @@ module Sem_05040103_parameters_of_kind_timer_002 { testcase TC_Sem_05040103_parameters_of_kind_timer_001() runs on C { timer t_tmr := 0.1; + var timer v_tmr := t_tmr; t_tmr.start; - f_test(t_tmr); + f_test(v_tmr); } control { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn index 91c9376a0a75aaf7f873fca9a9b58cd9cec17162..55ce3bdc952a501b535b4e49e32040b8e0227026 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/NegSem_05040104_parameters_of_kind_port_003.ttcn @@ -2,7 +2,7 @@ ** @author STF 521 ** @version 0.0.1 ** @purpose 1:5.4.1.4, Verify that in port parameters are not allowed - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn index 10a4d2e61d6946d0af9df1dacc695484d837d662..2f8b3324a596c56ec369d0f9138aa3efdf70b9d3 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_001.ttcn @@ -14,7 +14,7 @@ module Sem_05040104_parameters_of_kind_port_001 { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } type port TestPort message { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn index dcfe29d552d3f4688a7997ae175b7ee4cbd133ec..2de12b73fb7dc2e0b9efc86f89847a3a7426fe06 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050401_formal_parameters/05040104_parameters_of_kind_port/Sem_05040104_parameters_of_kind_port_002.ttcn @@ -24,7 +24,8 @@ module Sem_05040104_parameters_of_kind_port_002 { } testcase TC_Sem_05040104_parameters_of_kind_port_002() runs on C { - f_test(p); + var P v_port := p; + f_test(v_port); } control { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn index f89eee94b5a60626c57d1f950b618d4e75d85e39..b2b54428b8298f40995ea156a52398a6898d45ea 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_001.ttcn @@ -14,7 +14,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn index a1745d70b1fce955ad097dce6021f700c47359d2..162f6db40d413f7dcd26f86703dcc4e82522dfe7 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_002.ttcn @@ -15,7 +15,7 @@ type record MyRecord { boolean field2, address field3, MyEnumeratedType field4, - integer field5 + integer field5 optional } template MyRecord m_parametrizedTemplate1 diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn index 7fe9ca22fb38b96aa0ca8372148cae0bee1bea08..ddbcdfe44049fc46dc75fbe0f0b109d7b3b0e0a9 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_117.ttcn @@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_117 { } type record R { - integer field1 + integer field1 optional } function f_test(out template integer p_val) { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn index 79db2238b60d4a60cd32c194c46898f126ca3929..93dd01a944f063c7ef7e9caf41532aef9a8ff9c4 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_118.ttcn @@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_118 { } type record R { - integer field1 + integer field1 optional } function f_test(out template integer p_val) { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn index d643d11182eac9e4c02fbf870c6c82aaab41c0cf..314a3ba94badfd0124f6a925c1e81faeb825587c 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_123.ttcn @@ -17,7 +17,7 @@ module Sem_050402_actual_parameters_123 { } type record R { - integer field1 + integer field1 optional } altstep a_test(out template integer p_val) runs on GeneralComp { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn index 9038f5af5e07eceaea92ef1a1d16c036e294a38a..2beeeb4522d5ed75ef3bc2b76a9d5cb13dedbaa8 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_124.ttcn @@ -17,7 +17,7 @@ module Sem_050402_actual_parameters_124 { } type record R { - integer field1 + integer field1 optional } altstep a_test(out template integer p_val) runs on GeneralComp { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn index 4e41653830ce5b3adc67ed2d13163f7c22bcd1b9..4e0c1e127d7646659967121558dd967e60987816 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_129.ttcn @@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_129 { } type record R { - integer field1 + integer field1 optional } testcase TC_Sem_050402_actual_parameters_129(out template integer p_val) runs on GeneralComp { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn index ed914d9554153551c5995f0a8a88fdf344cdc679..130577a094451f8971fd33957900426fb197d335 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_130.ttcn @@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_130 { } type record R { - integer field1 + integer field1 optional } testcase TC_Sem_050402_actual_parameters_130(out template integer p_val) runs on GeneralComp { diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn index e8673279a948ec67a59bf47aad95691699ca0299..626ed95d4ccd5bc664fcbecb47f605ea058fdae3 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_152.ttcn @@ -18,7 +18,7 @@ module Sem_050402_actual_parameters_152 { type record R { integer field1, record { - integer subfield1, + integer subfield1 optional, integer subfield2 } field2 optional } diff --git a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn index d81031b84eefe64ea233e79e9712d1ea3402fef5..f4e193f401fdce3e1752d1124d310be6aa691540 100644 --- a/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn +++ b/ATS/core_language/05_basic_language_elements/0504_parametrization/050402_actual_parameters/Sem_050402_actual_parameters_188.ttcn @@ -16,7 +16,7 @@ module Sem_050402_actual_parameters_188 { type record R { integer field1, - integer field2 + integer field2 optional } template integer mw_int (integer p_upper) := (0..p_upper); diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020103_nested_type_definitions_for_field_types/Sem_06020103_nested_type_definitions_for_field_types_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020103_nested_type_definitions_for_field_types/Sem_06020103_nested_type_definitions_for_field_types_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0441d162e531e677ea9aeb480ccb82bd036d8448 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060201_record_type_and_values/06020103_nested_type_definitions_for_field_types/Sem_06020103_nested_type_definitions_for_field_types_002.ttcn @@ -0,0 +1,19 @@ +/*************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:6.2.1.3, Verify that it is possible to use a nested subtype constraints for record fields + ** @verdict pass accept, noexecution + ***************************************************/ + +// The following requirement is tested: +// TTCN 3 supports the definition of types for record fields nested within the record definition. +// ... the specification of subtype constraints [is] possible. + +module Sem_06020103_nested_type_definitions_for_field_types_002 { + // Example from the specification, 2nd part + type record MyRecordTypeWithSubtypedFields + { + integer field1 (1 .. 100), + charstring field2 length ( 2 .. 255 ) + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn index 2b49c841e8ecb326292854a9c25e3bcbb65091a8..f5e3d421241c506095597cc85ebe0e0881f2f429 100644 --- a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_001.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:6.2.4, constant as user-assigned enumerated values - ** @verdict pass reject + ** @verdict pass accept, noexecution ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn index 671a34817a4e8b8762a7090a77c17dd10ba6013c..75cc2494969b5b6e3a89b35657bd082af988b9a0 100644 --- a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060204_enumerated_type_and_values/NegSyn_060204_enumerated_type_and_values_002.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:6.2.4, expression as user-assigned enumerated value - ** @verdict pass reject + ** @verdict pass accept, noexecution ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021505_accessing_the_keys/Sem_06021505_accessing_the_keys_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021505_accessing_the_keys/Sem_06021505_accessing_the_keys_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7050a381a102ffa9100568af11f11cba272ba725 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021505_accessing_the_keys/Sem_06021505_accessing_the_keys_003.ttcn @@ -0,0 +1,31 @@ +/*************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:6.2.15.5, Verify that map keys are unique + ** @verdict pass accept, ttcn3verdict: pass + ***************************************************/ + +// The following requirement is tested: +// Since there is at most one value mapped to each key in a map value, the values in the set of keys +// will be unique. The length of the map value is equal to the length of the set of keys. + +module Sem_06021505_accessing_the_keys_003 { + type map from charstring to integer TMap1; + type component C {} + + testcase TC_Sem_06021505_accessing_the_keys_003() runs on C { + var TMap1 v_map; + v_map["test"] := 1; + v_map["xyz"] := 5; + v_map["test"] := 6; + if (match(v_map.from, { "test", "xyz" }) and lengthof(v_map.from) == 2) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06021505_accessing_the_keys_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021506_accessing_the_values/Sem_06021506_accessing_the_values_003.ttcn b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021506_accessing_the_values/Sem_06021506_accessing_the_values_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c5cef1d6f9a53a41f441994318694c66dbeda663 --- /dev/null +++ b/ATS/core_language/06_types_and_values/0602_structured_types_and_values/060215_map_types/06021506_accessing_the_values/Sem_06021506_accessing_the_values_003.ttcn @@ -0,0 +1,30 @@ +/*************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:6.2.15.6, Verify that map values don't have to be unique + ** @verdict pass accept, ttcn3verdict: pass + ***************************************************/ + +// The following requirement is tested: +// Since two different keys might be mapped to the same value in a map value, the values in the set of +// values might not be unique. The set of values will contain one value for each key value pair in +// the map. The length of the map value is equal to the length of the set of values. + +module Sem_06021506_accessing_the_values_003 { + type map from charstring to integer MapValueType; + type component C {} + + testcase TC_Sem_06021506_accessing_the_values_003() runs on C { + var MapValueType v_map := { ["a"] := 0, ["b"] := 0, ["c"] := 1 }; + var MapValueType.to v_values := v_map.to; + if (match(v_values, {0,1,0})) { // yields true + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_06021506_accessing_the_values_003()); + } +} diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn index 4fc0b3b4a45ccfecf3729f52025c00ba76af65b2..95d66693b1b37c0e4efa6a26647968fe45d20f10 100644 --- a/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060301_non-structured_types/Sem_060301_non_structured_types_002.ttcn @@ -20,11 +20,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_060301_non_structured_types_002() runs on GeneralComp { diff --git a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn index 0403c598f5e589337a54374e68dce1846fb6f123..797d1fe1c8e300c241f1874427a019173e38cd94 100644 --- a/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn +++ b/ATS/core_language/06_types_and_values/0603_type_compatibility/060302_structured_types/NegSem_060302_structured_types_001.ttcn @@ -2,7 +2,7 @@ ** @author STF 409 ** @version 0.0.1 ** @purpose 1:6.3.2.1, Reject assignment of other enumerated types since they are only compatible to synonym types - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module NegSem_060302_structured_types_001 { @@ -20,7 +20,7 @@ testcase TC_NegSem_060302_structured_types_001() runs on GeneralComp { var EnumeratedType v_enum1:=e_black; var EnumeratedRedefinition v_enum2; - v_enum2:=v_enum1; // not a synonym type + v_enum2:=v_enum1; // compatible enumeration setverdict(pass); } diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn index f59d8be3c2862b223d6ea800a72225dfe7bb0a45..72315cfdd49d2dfcdfa1f5f80b4cb1fbba933c99 100644 --- a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_019.ttcn @@ -15,11 +15,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_070101_ArithmeticOperators_019() runs on GeneralComp { diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn index 027c3ac0279410061e71a304fbece552d2938ebf..ac20ca001e84946a12535f77aca5faf80ad01db5 100644 --- a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_020.ttcn @@ -15,11 +15,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_070101_ArithmeticOperators_020() runs on GeneralComp { diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn index d9216eef7f98dcc014be68a83f099a42aeb2205e..a3da9551ad95e34d3b6def8ccf25ee184b2d2ef7 100644 --- a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_021.ttcn @@ -15,11 +15,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_070101_ArithmeticOperators_021() runs on GeneralComp { diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn index 28c8b4177f9636c905d760893436f4b0c1a0c671..6b2f2b0700d0845a21873d58cb42ead3b42cf90f 100644 --- a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_022.ttcn @@ -15,11 +15,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_070101_ArithmeticOperators_022() runs on GeneralComp { diff --git a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn index ab96edb0055e14dd0d4435ec9654cacec6698b06..3a73e31c61e40b30a09197ddfbab79043c0ce2d8 100644 --- a/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070101_arithmetic_operators/Sem_070101_ArithmeticOperators_023.ttcn @@ -15,11 +15,11 @@ type component GeneralComp { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_070101_ArithmeticOperators_023() runs on GeneralComp { diff --git a/ATS/core_language/07_expressions/0701_operators/070108_presence_checking_operators/07010802_ischosen_operator/Sem_07010802_ischosen_operator_003.ttcn b/ATS/core_language/07_expressions/0701_operators/070108_presence_checking_operators/07010802_ischosen_operator/Sem_07010802_ischosen_operator_003.ttcn index 8e7f2763f32d46fb7fe6fe4b49290a3e90b24ec0..a8a47228a6a74e84e9dbdc169883f916fd69cbaf 100644 --- a/ATS/core_language/07_expressions/0701_operators/070108_presence_checking_operators/07010802_ischosen_operator/Sem_07010802_ischosen_operator_003.ttcn +++ b/ATS/core_language/07_expressions/0701_operators/070108_presence_checking_operators/07010802_ischosen_operator/Sem_07010802_ischosen_operator_003.ttcn @@ -14,7 +14,7 @@ type component GeneralComp { testcase TC_Sem_07010802_ischosen_operator_003 () runs on GeneralComp { - template U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); + template(present) U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); template anytype mw_anytype := { U := m_u4 } var boolean v_i; diff --git a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn index b4e53ec3e511c9a8bf2163fd8e3729dc06c4e77c..5387b7138e5aa240b906808a3d67ec977dede9ab 100644 --- a/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn +++ b/ATS/core_language/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/Sem_08020301_GeneralFormatOfImport_006.ttcn @@ -1,11 +1,11 @@ /***************************************************************** ** @author STF 470 ** @version 0.0.1 - ** @purpose 1:8.2.3.1, Make sure that it is possible to use module prefix for local definitions - ** @verdict pass accept, ttcn3verdict:pass + ** @purpose 1:8.2.3.1, Make sure that it is not possible to use module prefix for local definitions + ** @verdict pass reject *****************************************************************/ -// The following requirements are tested: +// This old rule was removed from the standard in 2019: // When the definition is referenced in the same module where it is defined, the // module identifier of the module (the current module) also may be used for prefixing // the identifier of the definition. diff --git a/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_003.ttcn b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_003.ttcn index 1613faf832d31887bdb17c04349ebc47a5857c56..de4ba7231c487451c9d1de9a5a9613d990f99de1 100644 --- a/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_003.ttcn +++ b/ATS/core_language/14_procedure_signatures/NegSem_1400_procedure_signatures_003.ttcn @@ -8,7 +8,7 @@ module NegSem_1400_procedure_signatures_003 { - signature p_Sig1_001(in integer p_par1, out integer p_par2, inout integer p_par3) return port // Not allowed: only data types are allowed + signature p_Sig1_001(in integer p_par1, out integer p_par2, inout integer p_par3) return default // Not allowed: only data types are allowed exception (charstring); //execption is a string @@ -47,7 +47,7 @@ module NegSem_1400_procedure_signatures_003 { } } - testcase TC_NegSem_1400_procedure_signatures_003() runs on GeneralComp system GeneralComp { + testcase TC_Sem_1400_procedure_signatures_001() runs on GeneralComp system GeneralComp { var GeneralComp server := GeneralComp.create("RemoteProcedure Service"); var GeneralComp client := GeneralComp.create("RemoteProcedure Client"); @@ -73,7 +73,7 @@ module NegSem_1400_procedure_signatures_003 { } control{ - execute(TC_NegSem_1400_procedure_signatures_003()); + execute(TC_Sem_1400_procedure_signatures_001()); } } \ No newline at end of file diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_008.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_008.ttcn index f1af7d8d4fedf42120feb2aa89950593a83c6033..c1515312eb5a91123fe97c77691ec08f276c80e8 100644 --- a/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_008.ttcn +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/NegSem_1503_GlobalAndLocalTemplates_008.ttcn @@ -19,9 +19,9 @@ module NegSem_1503_GlobalAndLocalTemplates_008 { template p_NegSem_1503_GlobalAndLocalTemplates_008_SignatureTemplate s_notToUseInCallTemplate := { - p_in := 1, //NotUsedSymbol? + p_in := -, //NotUsedSymbol? p_inout := 2, - p_out := 3 + p_out := - } diff --git a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_010.ttcn b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_010.ttcn index d746faa3b80860caafa8dc37d80e4247c90ec735..eddf0ff1ebedfe27f6cbbf15b1bb1644bcc739a1 100644 --- a/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_010.ttcn +++ b/ATS/core_language/15_templates/1503_global_and_local_templates/Sem_1503_GlobalAndLocalTemplates_010.ttcn @@ -2,7 +2,7 @@ * @author TTF 014 * @version 0.0.1 * @purpose 1:15.3, Ensure that signature templates with restriction e) are accepted. - * @verdict pass reject + * @verdict pass accept, ttcn3verdict:pass *****************************************************************/ /* The following requirements are tested: * Signature templates that do not contain the @abstract modifier and fulfil the following condition: diff --git a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_009.ttcn b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_009.ttcn index 8b19ae2266577db7d32c656b44db12a0c8ca1366..4b1c3075e65beec003157401532e4e16a3c3fc45 100644 --- a/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_009.ttcn +++ b/ATS/core_language/15_templates/1505_modified_templates/NegSem_1505_ModifiedTemplates_009.ttcn @@ -20,7 +20,7 @@ module NegSem_1505_ModifiedTemplates_009 { boolean field3 } - template(value) MyRecordType m_myValueRecTemplate := + template(present) MyRecordType m_myValueRecTemplate := { field1 := 123, field2 := "A string", diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..386c4ac9ec4991393e71c09b961e8e02251827b8 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_001.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the left hand side. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150601_ReferencingIndividualStringElements_001 { + +type component GeneralComp { } + +testcase TC_NegSem_150601_ReferencingIndividualStringElements_001() runs on GeneralComp { + var template charstring v_char1 := "abc"; + + v_char1[2] := "test"; // will produce an error as the character string contains more than one character + + if (v_char1.value == "abtest") { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_150601_ReferencingIndividualStringElements_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..97705adcde6080528faefc8cd47636bf470e5302 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/NegSem_150601_ReferencingIndividualStringElements_002.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the right hand side. + ** @verdict pass reject + *****************************************************************/ + +module NegSem_150601_ReferencingIndividualStringElements_002 { + +type component GeneralComp { } + +testcase TC_NegSem_150601_ReferencingIndividualStringElements_002() runs on GeneralComp { + var template octetstring v_oct1 := '01??AB*'O; + var template octetstring v_oct2; + + v_oct2 := v_oct1[10]; // will produce an error as the index is greater than the length of v_oct1 + + if (match(v_oct2, *) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_NegSem_150601_ReferencingIndividualStringElements_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_001.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..33403600bb680cebcdce5671295955748efc4f54 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_001.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the right hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_001 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_001() runs on GeneralComp { + var template charstring v_char1 := "MYCHAR1"; + var template charstring v_char2; + var template charstring v_char3 := pattern "abc?[a-z]"; + + v_char2 := v_char1[1]; + + if (valueof(v_char2) == "Y") { + setverdict(pass); + } else { + setverdict(fail); + } + + v_char2 := v_char3[4]; // v_char2 will be equal to pattern "[a-z]" after the assignment + + if (match("a", v_char2) and match("z", v_char2) and not match("A", v_char2)) { //not matching all, just the boundaries and an outside value + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_001()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_002.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2a902a7ede7bba31b0fd455133836aef98fe1371 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_002.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the left hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_002 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_002() runs on GeneralComp { + var template charstring v_char1 := pattern "abc?[a-z]"; + + v_char1[6] := pattern "x+"; // v_char1 will contain pattern "abc?[a-z]?x+" after the assignment + + if (v_char1.value == "abc?[a-z]?x+") { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_002()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_003.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..615db747388756f82904b80e82f48c0719c699ac --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_003.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the left hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_003 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_003() runs on GeneralComp { + var template charstring v_char1 := "abc"; + + v_char1[4] := pattern "[a-f][g-k]"; // v_char1 will change to pattern "abc([a-f][g-k])" + + if (v_char1.value == "abc([a-f][g-k])") { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_003()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_004.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f84c00df7b03e24809a9927fc8d6ccdb74747546 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_004.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the right hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_004 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_004() runs on GeneralComp { + var template octetstring v_oct1 := '0123456789ABCDEF'O; + var template octetstring v_oct2; + + v_oct2 := v_oct1[1]; // v_oct2 will be equal to '23'O after the assignment + + if (v_oct2.value == '23'O) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_004()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_005.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e82d0e8624d09138b8e2fce13ff923ff10345c2a --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_005.ttcn @@ -0,0 +1,29 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the right hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_005 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_005() runs on GeneralComp { + var template octetstring v_oct1 := '01??AB*'O; + var template octetstring v_oct2; + + v_oct2 := v_oct1[2]; // v_oct2 will be equal to '?'O after the assignment + + if (match('EF'O, v_oct2)) { //It is quite impossible to check if v_oct2 contains the pattern '?'O indeed + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_005()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_006.ttcn b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8a7677d77d591e753f59cc952b5ad2ebcb73ade3 --- /dev/null +++ b/ATS/core_language/15_templates/1506_referencing_elements_of_template_fields/150601_referencing_individual_string_elements/Sem_150601_ReferencingIndividualStringElements_006.ttcn @@ -0,0 +1,28 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.6.1, Ensure that the referencing of individual string elements inside templates or template fields is allowed on the left hand side. + ** @verdict pass accept + *****************************************************************/ + +module Sem_150601_ReferencingIndividualStringElements_006 { + +type component GeneralComp { } + +testcase TC_Sem_150601_ReferencingIndividualStringElements_006() runs on GeneralComp { + var template octetstring v_oct1 := '0123'O; + v_oct1[2] := 'FF'O; // v_oct3 will change to '0123FF'O + + log(v_oct1); + if (v_oct1.value == '0123FF'O) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150601_ReferencingIndividualStringElements_006()); +} + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_055.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_055.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8dc16bb1d6cac3f96d87d2b980d6aa835a96f3ba --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_055.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) base templates are not allowed to be modified to template(value) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_055 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_055() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_055()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_056.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_056.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..42e048cfad045c6e6b037245fdbc1d4fba555891 --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_056.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(omit) base templates are not allowed to be modfied to template(present) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_056 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(omit) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_056() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_056()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_057.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_057.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4cb12a53ce9faeaa515fb9159a4d644f74943fbd --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_057.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) base templates are not allowed to be modified to template(omit) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_057 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_057() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_057()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_058.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_058.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b64430d2f6be9d0773ede630b680ae275f5a4f9 --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_058.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that template(present) base templates are not allowed to be modfied to template(value) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_058 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template(present) ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_058() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_058()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_059.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_059.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..18a3d3cf82a7ebc5485fc8ce8618d0a4a2c13b41 --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_059.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted base templates are not allowed to be modified to template(omit) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_059 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(omit) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_059() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_059()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_060.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_060.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6155e3c12d28e38c61f930236dea0684b4aabe48 --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_060.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted base templates are not allowed to be modified to template(value) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_060 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(value) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_060() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_060()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_061.ttcn b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_061.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dcd226d705b1ff02e6333514871a5413ffe7b31d --- /dev/null +++ b/ATS/core_language/15_templates/150801_explicit_restrictions/NegSem_1508_TemplateRestrictions_061.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:15.8, Ensure that unrestricted base templates are not allowed to be modified to template(present) + ** @verdict pass reject + *****************************************************************/ +// The following requirement is tested: +// Restriction d: +// A modified template may have a less strict restriction than the base template according to table 13B. + +module NegSem_1508_TemplateRestrictions_061 { + + type component GeneralComp { } + + type record ExampleType { + integer a, + boolean b optional + } + + template ExampleType m_baseTemplate := { + a := 20, + b := true + } + + template(present) ExampleType m_modifiedTemplate modifies m_baseTemplate := { + a := 21 + } + + testcase TC_NegSem_1508_TemplateRestrictions_061() runs on GeneralComp { + if (match({ 21, true }, m_modifiedTemplate)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control{ + execute(TC_NegSem_1508_TemplateRestrictions_061()); + } +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_001.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..52e0d355eb6df575025fffe56ad492dddb22b553 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_001.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of template(omit) base templates are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_001 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := omit; + +testcase TC_NegSem_150802_ImplicitRestrictions_001() runs on GeneralComp { + + var template(omit) integer v_omit_a := exampleOmit.a; //Not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_001()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_002.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..554081e50b2e3ab490c25d44c2410ca2aee4179e --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_002.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of template(omit) base templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_002 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + + +template(omit) ExampleType exampleOmit := {1, true}; + +testcase TC_NegSem_150802_ImplicitRestrictions_002() runs on GeneralComp { + + var template(value) boolean v_value_b := exampleOmit.b; //Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_002()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_003.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..0eb06fcd96ca1315c8cf43ecbcbc54848fcd618d --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_003.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of template(value) base templates are not allowed to implicite restrict to template(omit) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_003 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +// parent templates +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_NegSem_150802_ImplicitRestrictions_003() runs on GeneralComp { + + var template(omit) integer v_omit_a := exampleValue.a; //Not allowed + + setverdict(pass); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_003()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_004.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..93e02ccd4b16814f80c3deedfd3e1111e5c2627f --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_004.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of template(value) base templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ + + +module NegSem_150802_ImplicitRestrictions_004 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_NegSem_150802_ImplicitRestrictions_004() runs on GeneralComp { + + var template(value) boolean v_value_b := exampleValue.b; // Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_004()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_005.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..be2095d50d75dbd576b2fd01185c0cc1354afcd7 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_005.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of template(present) base templates are not allowed to implicite template without restriction + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_005 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_005() runs on GeneralComp { + + var template integer v_a := examplePresent.a; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_005()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_006.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..61597f85a063b77c11329a10492550153d62222f --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_006.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of template(value) base templates are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_006 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_006() runs on GeneralComp { + + var template(omit) boolean v_omit_b := examplePresent.b; //Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_006()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_007.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9e60ba96f56848205481da1c6d2ebdba3ec285e1 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_007.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_007 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_007() runs on GeneralComp { + + var template(value) integer v_value_a := example.a; //Not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_007()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_008.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7217d5ab3ee13039ec906337baaa1688207a2743 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_008.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of templates are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_008 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_008() runs on GeneralComp { + + var template (omit) boolean v_omit_b := example.b; //Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_008()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_009.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..42ec5bf72f10e8d20b61e117a2b418245cff0a9a --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_009.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(omit) are not allowed to implicite restrict to template(present) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'record of' template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_009 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_009() runs on GeneralComp { + + template (omit) RecordOfInt m_exampleOmit := omit; + + var template(present) integer v_present := m_exampleOmit[2]; //not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_009()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_010.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f26c35a04edc047f477d6718351553f7fd71c3fb --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_010.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(value) are not allowed to implicite restrict to template(omit) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_010 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_010() runs on GeneralComp { + + template (value) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (omit) integer v_omit := m_exampleValue[2]; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_010()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_011.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..881776e39079786bb8e916ad6a162d560f35df9b --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_011.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(present) are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'set of' template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_011 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_011() runs on GeneralComp { + + template (present) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (omit) integer v_omit := m_exampleValue[2]; //Not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_011()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_012.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bd8b3914ca0237396bc40e05b06ffc4fef483f05 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_012.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates are not allowed to implicite restrict to template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'record of' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_012 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_012() runs on GeneralComp { + + template RecordOfInt m_example := {1, 2, 3}; + + var template integer v_secondElem := m_example[2]; // Not allowed + + setverdict(pass); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_012()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_014.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1523a0db34eabb97283dcf82d2aa091ee8a43297 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_014.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of template(present) base templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_014 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_014() runs on GeneralComp { + + var template (value) integer v_value_a := examplePresent.a; //Not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_014()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_015.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1ffe448dc0339cf1c19970db88863c9398371042 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_015.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of template(value) base templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_015 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_015() runs on GeneralComp { + + var template(value) boolean v_present_b := examplePresent.b; //Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_015()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_016.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_016.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8edf5c22d8411dfcda47d20339ac22bcc29a8bd2 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_016.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced mandatory fields of templates are not allowed to implicite to template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_016 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, ?}; + +testcase TC_NegSem_150802_ImplicitRestrictions_016() runs on GeneralComp { + + var template integer v_value_a := example.a; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_016()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_017.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_017.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..046508ee356a7a64d3117404e0530b90e0df2515 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_017.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_017 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, false}; + +testcase TC_NegSem_150802_ImplicitRestrictions_017() runs on GeneralComp { + + var template (value) boolean v_value_b := example.b; // Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_017()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_018.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_018.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..48851476e1754abf57978ad6dbe1e832609747f1 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_018.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced optional fields of templates are not allowed to implicite restrict to template(present) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference optional field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module NegSem_150802_ImplicitRestrictions_018 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, false}; + +testcase TC_NegSem_150802_ImplicitRestrictions_018() runs on GeneralComp { + + var template (present) boolean v_present_b := example.b; // Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_018()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_019.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_019.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..946096e30e67dac9cb36b2a5b15b0056780f5f01 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_019.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(omit) are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'record of' template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_019 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_019() runs on GeneralComp { + + template (omit) RecordOfInt m_exampleOmit := omit; + + var template(omit) integer v_omit := m_exampleOmit[2]; //not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_019()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_020.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_020.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..fcae997889b06b8d2b0121f88b9a58d2e7c361cf --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_020.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(omit) are not allowed to implicite to template + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'record of' template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_020 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_020() runs on GeneralComp { + + template (omit) RecordOfInt m_exampleOmit := omit; + + var template integer v_int := m_exampleOmit[2]; //not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_020()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_021.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_021.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..945c40358b06198f04251ba602ddf4852a72b479 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_021.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(value) are not allowed to implicite restrict to template(present) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_021 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_021() runs on GeneralComp { + + template (value) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (present) integer v_present := m_exampleValue[2]; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_021()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_022.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_022.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..71b4af72b56e04559fd9a145b00d4571b6da82d3 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_022.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(value) are not allowed to implicite restrict to template(present) + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_022 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_022() runs on GeneralComp { + + template (value) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template integer v_present := m_exampleValue[2]; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_022()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_023.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_023.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..17ebd501d4f06fa58b6aa8cb17c7b10fe3e0160f --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_023.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(present) are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'set of' template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_023 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_023() runs on GeneralComp { + + template (present) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (value) integer v_value := m_exampleValue[2]; //Not allowed + + setverdict(fail); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_023()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_024.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_024.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..d4c117052b8f907d3f0507bc5937d97b64f93c11 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_024.ttcn @@ -0,0 +1,33 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates(present) are not allowed to implicite restrict to template + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_024 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_024() runs on GeneralComp { + + template (present) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template integer v_value := m_exampleValue[2]; //Not allowed + + setverdict(pass); +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_024()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_025.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_025.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..998684e3b7c46118dc2c964f8217c56f8b82b618 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_025.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates are not allowed to implicite restrict to template(value) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'record of' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_025 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_025() runs on GeneralComp { + + template RecordOfInt m_example := {1, 2, 3}; + + var template (value) integer v_value := m_example[2]; // Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_025()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_026.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_026.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..958f86705da5a78b325d5b51d38db337b26879bf --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/NegSem_150802_ImplicitRestrictions_026.ttcn @@ -0,0 +1,34 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced element of templates are not allowed to implicite restrict to template(omit) + ** @verdict pass reject + *****************************************************************/ + +/* + * Reference element of a 'record of' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module NegSem_150802_ImplicitRestrictions_026 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_NegSem_150802_ImplicitRestrictions_026() runs on GeneralComp { + + template RecordOfInt m_example := {1, 2, 3}; + + var template (omit) integer v_omit := m_example[2]; // Not allowed + + setverdict(fail); + +} + +control{ + execute(TC_NegSem_150802_ImplicitRestrictions_026()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_001.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1bf7cdfcbc128512e407f82dfbc5945576e2a8b7 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_001.ttcn @@ -0,0 +1,40 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_001 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(omit) ExampleType exampleOmit := { a := 1, b := omit }; + +testcase TC_Sem_150802_ImplicitRestrictions_001() runs on GeneralComp { + + var template(value) integer v_omit_a := exampleOmit.a; + + if ( isvalue(v_omit_a) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_001()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_002.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_002.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..16b0db5cf1350104646cdba066fc4e151dfe50cb --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_002.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference optional field of a record of a template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_002 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + + +template(omit) ExampleType exampleOmit := { a := 1, b := omit }; + +testcase TC_Sem_150802_ImplicitRestrictions_002() runs on GeneralComp { + + var template(omit) boolean v_omit_b := exampleOmit.b; + + if ( ispresent(v_omit_b) ) { + setverdict(fail); + } else { + setverdict(pass); + } + +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_002()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_003.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..415aede5762a500053ae75fdc75770a05b18d0b3 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_003.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_003 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +// parent templates +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_Sem_150802_ImplicitRestrictions_003() runs on GeneralComp { + + var template(value) integer v_value_a := exampleValue.a; + + if ( isvalue(v_value_a) ) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_003()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_004.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..ea5eba527390a20452a75bc0ed51bf5f48c9f910 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_004.ttcn @@ -0,0 +1,43 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference optional field of a record of a template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ + + +module Sem_150802_ImplicitRestrictions_004 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(value) ExampleType exampleValue := {1, true}; + +testcase TC_Sem_150802_ImplicitRestrictions_004() runs on GeneralComp { + + var template(omit) boolean v_value_b := exampleValue.b; + + if ( ispresent(v_value_b) ) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_004()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_005.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..52b5cccdc072f427d3c99f421d5964b0c62e194a --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_005.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_005 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_Sem_150802_ImplicitRestrictions_005() runs on GeneralComp { + + var template(present) integer v_present_a := examplePresent.a; + + if ( isvalue(v_present_a) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_005()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_006.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..52764240b1963fb304b447831ae5f33bdf9659a6 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_006.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference optional field of a record of a template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_006 { + +type component GeneralComp { } + +type record ExampleType { + integer a, + boolean b optional +} + +template(present) ExampleType examplePresent := {1, ?}; + +testcase TC_Sem_150802_ImplicitRestrictions_006() runs on GeneralComp { + + var template boolean v_present_b := examplePresent.b; + + if (ispresent(v_present_b) ) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_006()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_007.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9182501c1f83a0dd79dcb6ab8680a2c493945265 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_007.ttcn @@ -0,0 +1,41 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference mandatory field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_007 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, ?}; + +testcase TC_Sem_150802_ImplicitRestrictions_007() runs on GeneralComp { + + var template(present) integer v_template_a := example.a; + + if ( isvalue(v_template_a) ) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_007()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_008.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_008.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9e3d7cfdb2282a11546a19f3aefbed4c0e385265 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_008.ttcn @@ -0,0 +1,42 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference optional field of a record of a template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ + +module Sem_150802_ImplicitRestrictions_008 { + +type component GeneralComp { } + +type set ExampleType { + integer a, + boolean b optional +} + +template ExampleType example := {1, ?}; + +testcase TC_Sem_150802_ImplicitRestrictions_008() runs on GeneralComp { + + var template boolean v_template_b := example.b; + + if ( ispresent(v_template_b) ) { + setverdict(pass); + } else { + setverdict(fail); + } + +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_008()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_009.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_009.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..f8ae8d0c24dc043290c25a2d7649162dad5be28e --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_009.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'record of' template with omit restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_009 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_009() runs on GeneralComp { + + template (omit) RecordOfInt m_exampleOmit := { 1, 2, 3, 4 }; + + var template (value) integer v_omit := m_exampleOmit[2]; + + if (isvalue(v_omit)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_009()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_010.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_010.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..124444797eaee39ff5101d7d42aa0e74b47aba43 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_010.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with value restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_010 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_010() runs on GeneralComp { + + template (value) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (value) integer v_second := m_exampleValue[2]; + + if (match(3, v_second)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_010()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_011.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_011.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1079c342812168debafba242ecf3b223a030f6bb --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_011.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'set of' template with present restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_011 { + +type component GeneralComp { } + +type set of integer SetOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_011() runs on GeneralComp { + + template (present) SetOfInt m_exampleValue := {1, 2} & {3, 4}; + + var template (present) integer v_secondElem := m_exampleValue[2]; + + if (match(3, v_secondElem)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_011()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_012.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_012.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7ecd39cdf86703e65fcb4684ec375c009b838464 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_012.ttcn @@ -0,0 +1,37 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'record of' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_012 { + +type component GeneralComp { } + +type record of integer RecordOfInt; + +testcase TC_Sem_150802_ImplicitRestrictions_012() runs on GeneralComp { + + template RecordOfInt m_example := {1, 2, 3}; + + var template (present) integer v_secondElem := m_example[2]; + + if (isvalue(v_secondElem)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_012()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_013.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_013.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..229662c3a8c24623f40ee8751a21569cf9279840 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_013.ttcn @@ -0,0 +1,38 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'record of' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_013{ + +type component GeneralComp { } + +const integer c_length := 5; +type integer ArrayOfInt[c_length]; + +testcase TC_Sem_150802_ImplicitRestrictions_013() runs on GeneralComp { + + template ArrayOfInt m_example := {1, 2, 3, 4, 5}; + + var template (present) integer v_elem := m_example[4]; + + if (ispresent(v_elem)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_013()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_014.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_014.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7bb744d77f2e40d22e779fefedea888a584fe967 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_014.ttcn @@ -0,0 +1,39 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'union' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_014{ + +type component GeneralComp { } + +type union U { + integer option1, + charstring option2 +} + +testcase TC_Sem_150802_ImplicitRestrictions_014() runs on GeneralComp { + var template U m_union := { option1 := 12345}; + + var template (present) integer v_int := m_union.option1; + + if (ispresent(v_int)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_014()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_015.ttcn b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_015.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a2f1379107c8eb88aa5bde8cb45c9394304618c9 --- /dev/null +++ b/ATS/core_language/15_templates/150802_implicit_restrictions/Sem_150802_ImplicitRestrictions_015.ttcn @@ -0,0 +1,36 @@ +/***************************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.8.2, Ensure that referenced item have implicit template restriction. + ** @verdict pass accept, ttcn3verdict:pass + *****************************************************************/ + +/* + * Reference element of a 'union' template without restriction. + * (see Table 13C: Implicit restrictions) + * + */ +module Sem_150802_ImplicitRestrictions_015{ + +type component GeneralComp { } + +type anytype A; + +testcase TC_Sem_150802_ImplicitRestrictions_015() runs on GeneralComp { + var template A m_anytype := { integer := 12345}; + + var template (present) integer v_int := m_anytype.integer; + + if (ispresent(v_int)) { + setverdict(pass); + } else { + setverdict(fail); + } +} + +control{ + execute(TC_Sem_150802_ImplicitRestrictions_015()); +} + + +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn index 2606d2be70679b631eece32f02603829755d37d0..982e16d4ce010359588848f47481dd40a7b72158 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_007.ttcn @@ -2,7 +2,7 @@ ** @author STF 409 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a template(omit) can be assigned to a template(present) variable. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_007 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn index 20629cefa10ce32ce0445fbfd15b4701d8db0ef7..4cb612182d4d6b636fb6e3a98eb0363ccb6af525 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_016.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a base template can be modified with template(present) restriction. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_016 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn index 6bd6f3fc5e4f1ee1c06dc352d0ffdf93586c7034..974cf1fa1d0412facea268892d2fa7cc9e13c99e 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_017.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a base template can be modified with template(omit) restriction. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_017 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn index 944691f08c8802399935a800e0ecc71277339dcd..41057032e097fb509b36da96c0ec7654e949f3d4 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_018.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a base template can be modified with template(value) restriction. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_018 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn index f4e117168373ab1817c331b4bd8df1796b1e396c..01f577e2a97f5ad62919196b659e014b19119988 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_020.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a template(present) base template can be modified with template(value) restriction. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_020 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn index bb5c83249f3c50f1448d840d6f470780d9384dee..35548a5d7c9464469f8442ef6cdcf0ec0d7d1933 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_022.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that a template(omit) base template can be modified with template(value) restriction. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_022 { diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn index ab0a677abd2ecc8a5a271e46fe20da045af141e0..f7a35ebc171e71702319a72c9fe3286041d2dda4 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_024.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that template(present) base templates are allowed to be modfied to template(omit). - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn index e97568451c836ed5718168cc06579f1395603e53..9488f2c8599976afb97632ee14326225b945492b 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_025.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that template(omit) base templates are allowed to be modfied to template(present). - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn index a292d07da89ef19c76775b7219899414f16e1474..719cddac4bdace8736eca7a8a098d67cb86e1a23 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_031.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template(present) is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn index 91141099b1877c670bd29d92764fd45c1ffca3b5..d019bb32b8c7b62f85af38edb33e1b12ebf6952c 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_032.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template(omit) is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn index b7dd9aff0d7cbd25d578553585951a23d42670b7..06f5740120e651eafa05719650e41919b18bad06 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_033.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(value)->template is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn index 66f39257ea75812d88c14edf8511f68de0a59b08..d099e09871ab435542c3b295ef949192f5d164c9 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_034.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn index 312f001813ffa5dbda51a5151b583fe84c47327d..0b0a5bd7ba11977c024165815eeccb53a440fccd 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_035.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn index 5c2d320cf2adb0e51c403db47c47251409fdc8cd..bbe54648784123e29c78dffbb402b7048adff156 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_036.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that the restrictiveness of parameters template(omit)->template(present) is handled correctly. - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ // ATTENTION: valid for TTCN-3:2013 (ETSI ES 201 873-1 V4.5.1) and newer diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn index c081dcabbe80aaf2c4422650bee7e1e39d8ce4b3..4c2a486cf31a6c05e969810645289878e81aae0d 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_043.ttcn @@ -8,7 +8,7 @@ module Sem_1508_TemplateRestrictions_043 { type record ExampleType { // Exampletype record integer and a boolean - integer a, + integer a optional, boolean b } diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn index 96fa9d0c72e59b7f20909ec3278b054a230dee9d..c64a80bbbe895bcb46345b64a7df374d0ba721ac 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_044.ttcn @@ -8,7 +8,7 @@ module Sem_1508_TemplateRestrictions_044 { type record ExampleType { // Exampletype record integer and a boolean - integer a, + integer a optional, boolean b } diff --git a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn index 14c92b19c8e577412376e316aef344b8aabda470..3c78fb7cbe8636a9c3fbc5e487cc4eaf9647a402 100644 --- a/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn +++ b/ATS/core_language/15_templates/1508_template_restrictions/Sem_1508_TemplateRestrictions_045.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:15.8, Ensure that unrestricted template can be parameter to template(value) - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject *****************************************************************/ module Sem_1508_TemplateRestrictions_045 { diff --git a/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_001.ttcn b/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_001.ttcn index 35c2738ccd4194272dada77344217286062bc01a..9fa23afac4be606e0ef693d361dace7657bd1ca3 100644 --- a/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_001.ttcn +++ b/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_001.ttcn @@ -19,19 +19,15 @@ module Sem_1512_TheOmitOperation_001 { boolean b optional } - template ExampleType m_originalOmit := omit; - template(omit) ExampleType m_targetOmit := omit(m_originalOmit); - testcase TC_Sem_1512_TheOmitOperation_001() runs on GeneralComp { - var template(omit) ExampleType v_omit; - - v_omit := m_targetOmit; + template ExampleType m_originalOmit := omit; + template(omit) ExampleType m_targetOmit := omit(m_originalOmit); - if ( ispresent(v_omit) ) { - setverdict(fail); - } else { + if (istemplatekind(m_targetOmit, "omit")) { setverdict(pass); + } else { + setverdict(fail); } } diff --git a/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_002.ttcn b/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_002.ttcn index 561c170146c9a3eecc440924aba9f8ca432956f4..dc6fe207340ad05558ff042452fd124e0f03ff87 100644 --- a/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_002.ttcn +++ b/ATS/core_language/15_templates/1512_the_omit_operation/Sem_1512_TheOmitOperation_002.ttcn @@ -19,17 +19,13 @@ module Sem_1512_TheOmitOperation_002 { boolean b optional } - template ExampleType m_originalValue := {1, true}; - template(omit) ExampleType m_targetValue := omit(m_originalValue); - testcase TC_Sem_1512_TheOmitOperation_002() runs on GeneralComp { - var template(omit) ExampleType v_omit; - v_omit := m_targetValue; + template ExampleType m_originalValue := {1, true}; + + template(omit) ExampleType m_targetValue := omit(m_originalValue); - if (match(valueof(v_omit.a), 1) and - match(ispresent(v_omit.b), true ) - ) { + if (match(valueof(m_targetValue), m_originalValue)) { setverdict(pass); } else { setverdict(fail); @@ -39,4 +35,5 @@ module Sem_1512_TheOmitOperation_002 { control { execute(TC_Sem_1512_TheOmitOperation_002()); }; -} \ No newline at end of file +} + diff --git a/ATS/core_language/15_templates/1513_the_present_operation/NegSem_1512_ThePresentOperation_003.ttcn b/ATS/core_language/15_templates/1513_the_present_operation/NegSem_1512_ThePresentOperation_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..08857ba9f6e627940c9577f1176c7a82a150be21 --- /dev/null +++ b/ATS/core_language/15_templates/1513_the_present_operation/NegSem_1512_ThePresentOperation_003.ttcn @@ -0,0 +1,35 @@ +/*************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.12, The present operation + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + * present operation: + * A template with the present operationn shall cause an error if the operand not fulfils + * conditions of the prenent template restriction. + */ + +module NegSem_1512_ThePresentOperation_003 { + + type component GeneralComp {} + + type record ExampleType { + integer a, + boolean b optional + } + + testcase TC_NegSem_1512_ThePresentOperation_003() runs on GeneralComp { + + var template ExampleType m_originalAny := *; + + template(present) ExampleType m_targetAny := present(m_originalAny); // causes error + + setverdict(pass); + } + + control { + execute(TC_NegSem_1512_ThePresentOperation_003()); + }; +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1513_the_present_operation/Sem_1512_ThePresentOperation_001.ttcn b/ATS/core_language/15_templates/1513_the_present_operation/Sem_1512_ThePresentOperation_001.ttcn index 387dbd7a61d9afd7b091d8092e3b1d98baa83f6e..aa36b7642f13823b7705d9fbe4c108b5a396870d 100644 --- a/ATS/core_language/15_templates/1513_the_present_operation/Sem_1512_ThePresentOperation_001.ttcn +++ b/ATS/core_language/15_templates/1513_the_present_operation/Sem_1512_ThePresentOperation_001.ttcn @@ -1,31 +1,32 @@ /*************************************************** - * @author TTF 014 - * @version 0.0.1 - * @purpose 1:15.12, The present operation - * @verdict pass accept + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.12, The present operation + ** @verdict pass accept ***************************************************/ -/* The following requirements are tested: + + /* The following requirements are tested: * present restriction: * The present operatoion checks if a template instance fullfils conditions of the present template restriction. */ + module Sem_1512_ThePresentOperation_001 { + type component GeneralComp { - } + } type record ExampleType { integer a, boolean b optional } - template ExampleType m_originalValue := {1, true} - template(present) ExampleType m_targetValue := present(m_originalValue); + testcase TC_Sem_1512_ThePresentOperation_001() + runs on GeneralComp { - testcase TC_Sem_1512_ThePresentOperation_001() runs on GeneralComp { - var template(present) ExampleType v_present; + template ExampleType m_originalValue := {1, true} - v_present := m_targetValue; + template(present) ExampleType m_targetValue := present(m_originalValue); - if (match(valueof(v_present.a), 1) and - match(valueof(v_present.b), true)) { + if (match(valueof(m_targetValue), m_originalValue)) { setverdict(pass); } else { setverdict(fail); diff --git a/ATS/core_language/15_templates/1514_presentness_conversion/NegSem_1514_PresentnessConversion_001.ttcn b/ATS/core_language/15_templates/1514_presentness_conversion/NegSem_1514_PresentnessConversion_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8dde69fcd64fe26902e86c73804ade3723397f0b --- /dev/null +++ b/ATS/core_language/15_templates/1514_presentness_conversion/NegSem_1514_PresentnessConversion_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.14, Presentness conversion + ** @verdict pass reject + ***************************************************/ + + /* The following requirements are tested: + * presentness conversion: + * a. Applying the presentness conversion to a template that only matches the special value omit shall result in an error. + */ + +module NegSem_1514_PresentnessConversion_001 { + + type component GeneralComp {} + + testcase TC_NegSem_1514_PresentnessConversion_001() runs on GeneralComp { + + template boolean t_omit := omit + + var template(present) boolean v_present_omit := t_omit.present; //error + + if (match(v_present_omit, *)) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_NegSem_1514_PresentnessConversion_001()); + }; +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1514_presentness_conversion/Sem_1514_PresentnessConversion_001.ttcn b/ATS/core_language/15_templates/1514_presentness_conversion/Sem_1514_PresentnessConversion_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4fceb0893a6bb3db791b23ca4df0689e512b5600 --- /dev/null +++ b/ATS/core_language/15_templates/1514_presentness_conversion/Sem_1514_PresentnessConversion_001.ttcn @@ -0,0 +1,33 @@ +/*************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.14, Presentness conversion + ** @verdict pass accept + ***************************************************/ + +module Sem_1514_PresentnessConversion_001 { + + type component GeneralComp {} + + type record ExampleType { + integer a, + boolean b optional + } + + testcase TC_Sem_1514_PresentnessConversion_001() runs on GeneralComp { + + template ExampleType m_example := { 1, *}; // unrestricted + + var template(present) boolean v_field := m_example.b.present; // m_field is converted to ? from * + + if (istemplatekind(v_field, "?")) { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_1514_PresentnessConversion_001()); + }; +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1515_value_extraction/NegSem_1515_ValueExtraction_001.ttcn b/ATS/core_language/15_templates/1515_value_extraction/NegSem_1515_ValueExtraction_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3c5308000b4bd2635ee2600e37b965c43728cdd3 --- /dev/null +++ b/ATS/core_language/15_templates/1515_value_extraction/NegSem_1515_ValueExtraction_001.ttcn @@ -0,0 +1,27 @@ +/*************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.15, Value extraction + ** @verdict pass reject + ***************************************************/ + +/* The following requirements are tested: + * Value extraction: + * a. Applying the value extraction to a template that contains neither a pattern nor a value template with an ifpresent matching attribute nor a value shall result in an error. + */ + +module NegSem_1515_ValueExtaction_001 { + + type component GeneralComp {} + + testcase TC_NegSem_1515_ValueExtaction_001 runs on GeneralComp { + + var template charstring v_any := ?; + var charstring v_cs := v_any.value; //shall result in an error + setverdict(pass); + } + + control { + execute(TC_NegSem_1515_ValueExtaction_001); + }; +} \ No newline at end of file diff --git a/ATS/core_language/15_templates/1515_value_extraction/Sem_1515_ValueExtraction_001.ttcn b/ATS/core_language/15_templates/1515_value_extraction/Sem_1515_ValueExtraction_001.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..756d47fa7aceb16643d4d03fbd0328486643aee0 --- /dev/null +++ b/ATS/core_language/15_templates/1515_value_extraction/Sem_1515_ValueExtraction_001.ttcn @@ -0,0 +1,32 @@ +/*************************************************** + ** @author TTF 014 + ** @version 0.0.1 + ** @purpose 1:15.15, Value extraction + ** @verdict pass accept + ***************************************************/ + +module Sem_1515_ValueExtaction_001 { + + type component GeneralComp {} + + testcase TC_Sem_1515_ValueExtaction_001() runs on GeneralComp { + + var template charstring v_pattern := pattern "ab\?#(1,1)"; + if (v_pattern.value == "ab\?#(1,1)") { + setverdict(pass); + } else { + setverdict(fail); + } + + var template charstring v_ifpresent := "abc" ifpresent; + if (v_ifpresent.value == "abc") { + setverdict(pass); + } else { + setverdict(fail); + } + } + + control { + execute(TC_Sem_1515_ValueExtaction_001()); + }; +} \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn index 38dfd4d5b8484206423b77fdfdf1c5df5e7b6220..ff973f20adb5018b3604fdb57cd0d1e3d412d714 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_029.ttcn @@ -2,7 +2,7 @@ ** @author STF 433 ** @version 0.0.1 ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ module NegSem_160102_predefined_functions_029 { type enumerated EnumeratedType {e_black, e_white}; @@ -28,7 +28,7 @@ testcase TC_NegSem_160102_predefined_functions_029 () runs on GeneralComp { var EnumeratedTypeWithLabels3 vl_enum3_yellow := e_yellow; - if( match(enum2int(EnumeratedTypeWithLabels1.e_black), 0) //not allowed selection + if( match(enum2int(EnumeratedTypeWithLabels1.e_black), 1) //not allowed selection ) { setverdict(pass); } diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn index f099e24a0d753bb8abb2b50695883898d7e98a49..f6b2ed6df402aab5ff153e1a710afcda51f09a39 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_037.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ /* The following requirements are tested: @@ -21,12 +21,11 @@ testcase TC_NegSem_160102_predefined_functions_037 () runs on GeneralComp { var template bitstring Mytemp := '00101*'B; - var bitstring v_i; + var template bitstring v_i; v_i:=substr(Mytemp,1,2); //error: contains a matching mechanism other than AnyElement - - - + if (v_i.value == '01'B) { setverdict(pass); } + else { setverdict(fail); } } diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_062.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_062.ttcn index 4808f3fbca1da83afa2f2e9429a38d848b97d932..4aa8c091e50d76af0cf51b1bfb1ab73bfeb713e3 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_062.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_062.ttcn @@ -2,7 +2,7 @@ ** @author STF T003 ** @version 0.0.1 ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: @@ -22,7 +22,7 @@ module NegSem_160102_predefined_functions_062 { testcase TC_NegSem_160102_predefined_functions_062() runs on GeneralComp { var integer v_i; - v_i:=sizeof(MyROI); // error: template is a record of integers + v_i:=sizeof(MyROI); // deprecated feature (G.4): template is a record of integers setverdict(pass, v_i); } diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_063.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_063.ttcn index e8d4b69c15a3a83a7df9e25e70d82660c2d0c5d7..9c9828b5f51835b5d3b982a9f0964a72e3eb63d9 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_063.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/NegSem_160102_predefined_functions_063.ttcn @@ -2,7 +2,7 @@ ** @author STF T003 ** @version 0.0.1 ** @purpose 1:16.1.2, Ensure that the IUT recognizes predefined functions and correctly evaluates them (as specified by Annex C) - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: @@ -22,7 +22,7 @@ module NegSem_160102_predefined_functions_063 { testcase TC_NegSem_160102_predefined_functions_063() runs on GeneralComp { var integer v_i; - v_i:=sizeof(MySOI); // error: template is a set of integers + v_i:=sizeof(MySOI); // deprecated feature (G.4): template is a set of integers setverdict(pass, v_i); } diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn index 22dbb326402be4fb2194b7b902d30d80e359a5f6..37f2ba2e4547edb741b1529700870dfe7ecb1bea 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_001.ttcn @@ -15,11 +15,11 @@ module Sem_160102_predefined_functions_001 { * @return true if abs(f1 - f2) < 1.E-6 */ function f_isFloatNear(in float f1, in float f2) return boolean { - var float delta := f1-f2; - if (delta < 0.0) { - delta := 0.0 - delta; + var float diff := f1-f2; + if (diff < 0.0) { + diff := 0.0 - diff; } - return delta < 1E-6; + return diff < 1E-6; } testcase TC_Sem_160102_predefined_functions_001 () runs on GeneralComp { diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn index 05710dee5e10c1adb4223a1ebda781791482de90..f387cd94e007181e7149ca1f7b7a428e71334b04 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_016.ttcn @@ -19,7 +19,7 @@ module Sem_160102_predefined_functions_016 { } testcase TC_Sem_160102_predefined_functions_016 () runs on GeneralComp { - var template I v_test := 0; + var template(value) I v_test := 0; var bitstring v_res := encvalue(v_test); if (lengthof(v_res) == 32) { setverdict(pass); diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn index dd3af395280ecba43a4540b350263bf399398199..c27d5636c8045007f86f1e4f55f385323319f04d 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_095.ttcn @@ -14,7 +14,7 @@ type component GeneralComp { testcase TC_Sem_160102_predefined_functions_095 () runs on GeneralComp { - template U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); + template(present) U m_u4 := ({ f1 := 2 }, {f2 := 'AB'O }); template anytype mw_anytype := { U := m_u4 } var boolean v_i; diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn index dccaebbed884bea86754e1f2ecf6e1b07f56ce1d..21a949294413733bb882ccd48f1198f3975adcbb 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_097.ttcn @@ -16,7 +16,7 @@ type component GeneralComp { testcase TC_Sem_160102_predefined_functions_097 () runs on GeneralComp { - var template I v_test := 0; + var template(value) I v_test := 0; var bitstring v_res := encvalue(v_test, "encoding_info_text"); if (lengthof(v_res) == 32) { setverdict(pass,v_res); diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn index 3df2b7a6a4dd8901e34a7308f2209a2d3ffe924e..e1415401dd384773053c985768f37bafc0ce53a1 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_098.ttcn @@ -16,7 +16,7 @@ type component GeneralComp { testcase TC_Sem_160102_predefined_functions_098 () runs on GeneralComp { - var template I v_test := 0; + var template(value) I v_test := 0; var bitstring v_enc := encvalue(v_test, "encoding_info_text"); if (match(decvalue(v_enc,v_test,"decoding_info_text"), 0)){ diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn index b010f8701db23ed3f29add3f6adc6f89b2189e3f..55d64e4a1967a2a6297208aa94115aeb94679121 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_104.ttcn @@ -28,7 +28,7 @@ module Sem_160102_predefined_functions_104 { testcase TC_Sem_160102_predefined_functions_104 () runs on GeneralComp { - var template MyPDU v_temp := { "test",5}; + var template(value) MyPDU v_temp := { "test",5}; //Encoding: var octetstring v_enc := encvalue_o(v_temp); //encode the record to octetstring diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn index 60829ace6c06043e5bafe8617b04e0a1dde30520..64621d2ec6d0216a27cdc1402dfa81a1d3d100c1 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_107.ttcn @@ -26,7 +26,7 @@ module Sem_160102_predefined_functions_107 { var integer v_dec with { variant "32 bit" }; var integer v_res; - var template MyPDU v_temp := {"testText",5}; + var template(value) MyPDU v_temp := {"testText",5}; var octetstring v_ref := encvalue_o(v_temp); //log(v_ref); //'74657374546578740005000000'O v_ref := v_ref[1]; // trunk encoded octetstring diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_110.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_110.ttcn index 6cf9f1afc37820029b60a28b228a7fd1f3ffc274..4fddfedcf72ce5307a8e2d58f35152fd837b9644 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_110.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_110.ttcn @@ -19,33 +19,31 @@ parameter bit_length. module Sem_160102_predefined_functions_110 { type component GeneralComp { - } type bitstring MyPDU; - - testcase TC_Sem_160102_predefined_functions_110 () runs on GeneralComp { - var MyPDU v_bitstr := '011'B; - var octetstring result := '0300000060'O; // bit length not divisable by 8, the encoded message will be left-aligned in the returned octetstring and the least significant (8 - (bit length mod 8)) bits in the least significant octet will be 0. - - //Encoding: - var octetstring v_enc := encvalue_o(v_bitstr); //encode the non octet based bitstring to octetstring + var MyPDU v_bitstr := '011'B; - if (lengthof (v_enc) > 0 and match(v_enc,result)) { - setverdict(pass); - } else { - setverdict(fail,v_enc); - } + //Encoding: + var octetstring v_enc := encvalue_o(v_bitstr); //encode the non octet based bitstring to octetstring + var bitstring v_bitEnc := encvalue(v_bitstr); //encode the non octet based bitstring to bitstring - } + while (lengthof(v_bitEnc) mod 8 > 0) { // right padding, because bit2oct uses left padding by default + v_bitEnc[lengthof(v_bitEnc)] := '0'B; + } + + if (v_enc == bit2oct(v_bitEnc)) { + setverdict(pass); + } else { + setverdict(fail,v_enc); + } - control{ + } + control { execute(TC_Sem_160102_predefined_functions_110()); - } - } \ No newline at end of file diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_113.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_113.ttcn index 56d2e6f81f2b125d16e758f13e59f90145267cba..fba1a1a0a03047515381c82fd725589be1d9216a 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_113.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_113.ttcn @@ -11,7 +11,7 @@ * */ -module Sem_160102_predefined_functions_113 { +module Sem_160102_predefined_functions_113 language "TTCN-3:2021" { type component GeneralComp {} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_114.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_114.ttcn index 37044c4e66df0a3cfd66a5b676aa3a08e1cd8808..7404bdd8e4a6b885022314abdf3a7136c798ba2c 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_114.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_114.ttcn @@ -11,7 +11,7 @@ * */ -module Sem_160102_predefined_functions_114 { +module Sem_160102_predefined_functions_114 language "TTCN-3:2021" { type component GeneralComp {} diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_116.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_116.ttcn index 0affe3f57341c8d6d0d1af591ab73dfda0008b78..bd52749805f4adf8acb7fd0a3d00783a74ad562b 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_116.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160102_predefined_functions/Sem_160102_predefined_functions_116.ttcn @@ -27,11 +27,17 @@ module Sem_160102_predefined_functions_116 { v_res := replace(v_Rec1,0,1,{23}); v_expected := {23,0,-,2}; - if(match(v_res, v_expected)) { - setverdict(pass,v_res); - } else { + for (var integer i := 0; i < lengthof(v_res); i := i + 1) { + if (isbound(v_res[i])) + { + if (v_res[i] == v_expected[i]) { continue; } + } else { + if (not isbound(v_expected[i])) { continue; } + } setverdict(fail,"The value of v_res:",v_res); + stop; } + setverdict(pass,v_res); } control{ diff --git a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn index 3bcc56c0edb40b8f30dfeb63fce6c795e11a56e5..9edceabf1d2834e7de46596d2ef6df1b801e310c 100644 --- a/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn +++ b/ATS/core_language/16_functions_altsteps_testcases/1601_functions/160103_external_functions/NegSem_160103_external_functions_001.ttcn @@ -2,7 +2,7 @@ ** @author STF 409 ** @version 0.0.1 ** @purpose 1:16.1.3, Ensure that the IUT recognizes external functions - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ** @configuration external_functions ***************************************************/ module NegSem_160103_external_functions_001 { diff --git a/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_004.ttcn b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..af069f3a62670e2d91f26509cf2c21eb744c3d37 --- /dev/null +++ b/ATS/core_language/16_functions_altsteps_testcases/1603_testcases/Syn_1603_testcases_004.ttcn @@ -0,0 +1,45 @@ +/*************************************************** + ** @author TTF T014 + ** @version 0.0.1 + ** @purpose 1:16.3, Ensure that the IUT properly evaluates invocation of testcases without clause "runs on", but with clause "system" + ** @verdict pass accept, ttcn3verdict:pass + ***************************************************/ +/** + * a) interface part (optional): denoted by the keyword runson which references the required component type for the MTC and makes the associated port names visible within the MTC behaviour. + * In case the runson clause is missing, the MTC created by the test case has no ports, and no component constants and variables; + */ +module Syn_1603_testcases_004 { + + type port loopbackPort message { + inout integer + } + + type component GeneralComp { + port loopbackPort messagePort; + const integer c_i := 2; + var integer v_i := 2; + } + + function f_ptcScript() runs on GeneralComp system GeneralComp { + messagePort.send(c_i); + if (match(v_i, c_i)) { // constant and variables from GeneralComp + setverdict(pass); + } else { + setverdict(fail, v_i, c_i); + } + } + + testcase TC_Syn_1603_testcases_004 () system GeneralComp { + // testcase without clause "runs on", but "system" clause is present + var GeneralComp v_ptc := GeneralComp.create; + map(v_ptc:messagePort, system:messagePort); + v_ptc.start(f_ptcScript()); + v_ptc.done; + setverdict(pass); + } + + control{ + execute(TC_Syn_1603_testcases_004()); + } + +} diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn index ed84d30b574595e1dae3e2744c0dfb6c60b77074..5863a89464f4bfa140dcf1d065e0c9d3241e64f5 100644 --- a/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn +++ b/ATS/core_language/20_statement_and_operations_for_alt/2004_the_interleave_statement/NegSem_2004_InterleaveStatement_013.ttcn @@ -1,16 +1,16 @@ /***************************************************************** ** @author STF 584 ** @version 0.0.1 - ** @purpose 1:20.4, verify that conditional goto cannot be inside interleave - ** @verdict pass reject + ** @purpose 1:20.4, verify that conditional goto can be used to jump out of interleave + ** @verdict pass accept, ttcn3verdict:pass *****************************************************************/ // The following requirement is tested: // Restriction d) // The restricted use of the control transfer statements for, while, do-while, and goto within interleave // statements is allowed under the following conditions: -// b. The goto statement can be used for defining unconditional jumps within statements blocks that do not -// contain reception statements and for specifying unconditional jumps out of interleave statements. +// b. The goto statement can be used for defining jumps with statements blocks that do not contain reception +// statements and for specifying jumps out of interleave statements. module NegSem_2004_InterleaveStatement_013 { diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn index 5f7e43d85c789461598b52a2e1d7f9144026ce02..5d642ff24bb59b7a5ee52f92967954e85df9920c 100644 --- a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_002.ttcn @@ -2,7 +2,7 @@ ** @author STF 470 ** @version 0.0.1 ** @purpose 1:20.5.2, verify error is generated when passing local timer - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn index 3e7ae3192d013af110198037fe0a84a8af4fdff9..55af4f431739f82ca85a520efccedf1666fec3a0 100644 --- a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_006.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:20.5.2, local timer as a parameter of activated altstep in module control - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn index 61efe063768417a0b3648ee03751288bad012218..db170ad1c8c8f4a7f70d5ebea577b089095b85f6 100644 --- a/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn +++ b/ATS/core_language/20_statement_and_operations_for_alt/2005_default_handling/200502_the_activate_operation/NegSem_200502_the_activate_operation_007.ttcn @@ -2,7 +2,7 @@ ** @author STF 487 ** @version 0.0.1 ** @purpose 1:20.5.2, local timer (referenced through timer parameter) as a parameter of activated altstep in module control - ** @verdict pass reject + ** @verdict pass accept, ttcn3verdict:pass ***************************************************/ // The following requirement is tested: diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn index e77b565281601e96645a4f9ccf02191215bbf7c6..5c00c40ffc4bd54026d607c7e72817022683991b 100644 --- a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_011.ttcn @@ -2,7 +2,7 @@ ** @author STF 451 (updated by STF 521) ** @version 0.0.2 ** @purpose 1:21.1.1, Ensure that the the IUT allows connecting ports with empty outlists - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject ***************************************************/ // NOTE: the test shall pass as empty set (in this case a list of allowed out types) is always a subset // of another set (in this case a list of allowed in types). For that reason, the test was changed diff --git a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn index ece3db2601515f9f669054d655f3ce94c3bb53ce..ba6175702bee85ac4944a93b13b453db457588ac 100644 --- a/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn +++ b/ATS/core_language/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/Sem_210101_connect_and_map_operations_012.ttcn @@ -2,7 +2,7 @@ ** @author STF 451 (updated by STF 521) ** @version 0.0.1 ** @purpose 1:21.1.1, Ensure that IUT can map ports with empty outlist-PORT1 and inlist-PORT2 - ** @verdict pass accept, ttcn3verdict:pass + ** @verdict pass reject ***************************************************/ // NOTE: the test shall pass as empty set (in this case outlist-PORT1 and inlist-PORT2) is always a subset // of another set (in this case outlist-PORT2 and inlist-PORT1). For that reason, the test was changed diff --git a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn index f742c76f8d48ba038e9a0209d8f72862e0d9051a..f5be0bae47979d6bf5b7a26cd5d859e5fff80a63 100644 --- a/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn +++ b/ATS/core_language/22_communication_operations/2203_procedure_based_communication/220303_reply_operation/Sem_220303_ReplyOperation_005.ttcn @@ -27,7 +27,7 @@ module Sem_220303_ReplyOperation_005 { } function f_server() runs on GeneralComp { - var template R v_rec := { field1 := 0, field2 := ? } + var template(present) R v_rec := { field1 := 0, field2 := ? } p.getcall(S:?); p.reply(S:{par1 := v_rec}); } diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn index 2930942dd8e3368e97eff6f80200cb13ebcf1624..e08a0090377da994477d7b397f3e49f564bac541 100644 --- a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_006.ttcn @@ -23,16 +23,16 @@ module Sem_B010303_permutation_006 { type component GeneralComp { port loopbackPort messagePort } - +type record of integer RoI; testcase TC_Sem_B010303_permutation_006() runs on GeneralComp { var MessageType v_testMessage; - var template integer mw_field1 [4] := { permutation ( 1, 2, 3 ), 5 }; - var template integer mw_field2 [4] := { permutation ( 1, 2, ? ), 5 }; - var template integer mw_field3 [4] := { permutation ( 1, 2, 3 ), * }; - var template integer mw_field4 [4] := { permutation ( (1,2,3), 2, 3 ), 5 }; + var template(present) integer mw_field1 [4] := { permutation ( 1, 2, 3 ), 5 }; + var template(present) integer mw_field2 [4] := { permutation ( 1, 2, ? ), 5 }; + var template(present) integer mw_field3 [4] := { permutation ( 1, 2, 3 ), * }; + var template(present) integer mw_field4 [4] := { permutation ( (1,2,3), 2, 3 ), 5 }; - template MessageType mw_matchingTemplate:= + template MessageType mw_matchingTemplate := { mw_field1, mw_field2, diff --git a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn index a65c81143e0449c209796943b06d2d3758613e6c..c62985f013f6907cc4263f331982176203e1c6fa 100644 --- a/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn +++ b/ATS/core_language/B_matching_incoming_values/B01_template_matching/B0103_matching_inside_values/B010303_permutation/Sem_B010303_permutation_009.ttcn @@ -27,7 +27,7 @@ type component GeneralComp { } template SoI t_source := { 1, 2 ,?}; - template RoI t_perm1 := { permutation (all from t_source), 5 }; //using all from with ? + template(present) RoI t_perm1 := { permutation (all from t_source), 5 }; //using all from with ? testcase TC_Sem_B010303_permutation_009() runs on GeneralComp {