diff --git a/conformance_test/core_language_tests/negative_tests/06_types_and_values.script b/conformance_test/core_language_tests/negative_tests/06_types_and_values.script index eb0db169efb9f62cfb5ab517fbb0403029cee951..85f9fd3ee8a1813cdc9774c5f15d0c6598b65ee1 100644 --- a/conformance_test/core_language_tests/negative_tests/06_types_and_values.script +++ b/conformance_test/core_language_tests/negative_tests/06_types_and_values.script @@ -5297,7 +5297,7 @@ module NegSyn_06020502_option_and_union_001 { <END_MODULE> <RESULT COUNT 1> -error: at or before token `optional': syntax error, unexpected OptionalKeyword, expecting '\}' or ',' +error: at or before token `optional': syntax error, unexpected OptionalKeyword, expecting ',' or '\}' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/negative_tests/07-14_folder.script b/conformance_test/core_language_tests/negative_tests/07-14_folder.script index 80f0b4b8f57d83343220044272c1031cc24091c3..f0ab1f9b663982c2e9cd2f68af2bb0ff2d6a5f50 100644 --- a/conformance_test/core_language_tests/negative_tests/07-14_folder.script +++ b/conformance_test/core_language_tests/negative_tests/07-14_folder.script @@ -736,34 +736,6 @@ error: Right operand of operation `&' should be a string, `record of' or `set of :h2. 08_modules folder .*---------------------------------------------------------------------* -*---------------------------------------------------------------------* -:h3. NegSyn_0801_DefinitionOfAModule_001 negative test -.*---------------------------------------------------------------------* -:xmp tab=0. - -<TC - 0801_001 Ensure that a module definition with multiple language specifications is rejected. > - -<COMPILE> - -<MODULE TTCN NegSyn_0801_DefinitionOfAModule_001 NegSyn_0801_DefinitionOfAModule_001.ttcn > -/***************************************************************** - ** @version 0.0.1 - ** @purpose 1:8.1, Ensure that a module definition with multiple language specifications is rejected. - ** @verdict pass reject - *****************************************************************/ -// list of languages is not allowed -module NegSyn_0801_DefinitionOfAModule_001 language "TTCN-3:2005", "TTCN-3:2009", "TTCN-3:2010" { - -} -<END_MODULE> - -<RESULT COUNT 1> -error: at or before token `,': syntax error, unexpected ',', expecting '\{' -<END_RESULT> - -<END_TC> -:exmp - *---------------------------------------------------------------------* :h3. NegSem_08020301_GeneralFormatOfImport_002 negative test .*---------------------------------------------------------------------* @@ -3041,7 +3013,7 @@ module NegSyn_12_toplevel_timer_007 { <END_MODULE> <RESULT COUNT 1> -error: at or before token `1.0': syntax error, unexpected FloatValue, expecting '\}' or ',' +error: at or before token `1.0': syntax error, unexpected FloatValue, expecting ',' or '\}' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/negative_tests/15_templates.script b/conformance_test/core_language_tests/negative_tests/15_templates.script index 195cea34b2d8f38fd8ea2e2ed058e266ce77d7bd..f341770c3ff8dab7db96c16efae58b9b8d26a66c 100644 --- a/conformance_test/core_language_tests/negative_tests/15_templates.script +++ b/conformance_test/core_language_tests/negative_tests/15_templates.script @@ -4398,24 +4398,27 @@ Dynamic test case error: Performing a valueof or send operation on a non-specifi .*---------------------------------------------------------------------* :xmp tab=0. -<TC - 1510_005 Ensure that the valueof function works correctly on range templates. > +<TC - 1510_005 check that runtime error occurs if valueof is applied to uninitialized template > <COMPILE> <EXECUTE_PARALLEL> <MODULE TTCN NegSem_1510_ValueOfOperation_005 NegSem_1510_ValueOfOperation_005.ttcn > -/***************************************************************** +/****************************************************************************** ** @version 0.0.1 - ** @purpose 1:15.10, Ensure that the valueof function works correctly on range templates. + ** @purpose 1:15.10, check that runtime error occurs if valueof is applied to uninitialized template ** @verdict pass reject - *****************************************************************/ + ***************************************************/ -module NegSem_1510_ValueOfOperation_004 { +// The following requirement is tested: +// The template shall be completely initialized and resolve to a specific value. + +module NegSem_1510_ValueOfOperation_005 { type component GeneralComp { } - testcase TC_NegSem_1510_ValueOfOperation_004() runs on GeneralComp { - var template integer v_test := (1..5); + testcase TC_NegSem_1510_ValueOfOperation_005() runs on GeneralComp { + var template integer v_test; var integer v_second := valueof(v_test); @@ -4425,7 +4428,61 @@ module NegSem_1510_ValueOfOperation_004 { } control{ - execute(TC_NegSem_1510_ValueOfOperation_004()); + execute(TC_NegSem_1510_ValueOfOperation_005()); + } + +} +<END_MODULE> + +<RESULT COUNT 1> +Dynamic test case error: Performing a valueof or send operation on a non-specific integer template +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_1510_ValueOfOperation_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 1510_006 check that runtime error occurs if valueof is applied to partially initialized template > + +<COMPILE> +<EXECUTE_PARALLEL> + +<MODULE TTCN NegSem_1510_ValueOfOperation_006 NegSem_1510_ValueOfOperation_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:15.10, check that runtime error occurs if valueof is applied to partially initialized template + ** @verdict pass reject + ***************************************************/ + +// The following requirement is tested: +// The template shall be completely initialized and resolve to a specific value. + +module NegSem_1510_ValueOfOperation_006 { + + type component GeneralComp { } + + type record R { + integer field1, + integer field2 + } + + testcase TC_NegSem_1510_ValueOfOperation_006() runs on GeneralComp { + var template R v_test; + var R v_result; + v_test.field1 := 1; // field2 is left uninitialized + v_result := valueof(v_test); + + // if we get here, something must be wrong as valueof on v_test shall cause an error + // as it is not a template. + setverdict(fail); + } + + control{ + execute(TC_NegSem_1510_ValueOfOperation_006()); } } diff --git a/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script b/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script index b78dc42ab7275de8887ae380ef8a4fe371492c2b..a2586dc914fca85060baa2379535e98236566e7b 100644 --- a/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script +++ b/conformance_test/core_language_tests/negative_tests/21_configuration_operations.script @@ -679,6 +679,60 @@ error: The connection between port types `@NegSem_210101_connect_operation_001.m <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_210101_connect_operation_002 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 210101_001 Ensure that the the IUT does not allow connecting incompatible ports > + +<COMPILE> + +<MODULE TTCN NegSem_210101_connect_operation_002 NegSem_210101_connect_operation_002.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:21.1.1, Ensure that the the IUT does not allow connecting incompatible ports + ** @verdict pass reject + ***************************************************/ +//Test the two input port cannot connect +module NegSem_210101_connect_operation_002{ + + type port myport message { + in integer + } with {extension "internal"} + + type component Mysystem + { + port myport messagePort; + } + + testcase TC_NegSem_210101_connect_operation_002() runs on Mysystem system Mysystem { + var Mysystem MyCompA; + var Mysystem MyCompB; + + MyCompA:=Mysystem.create; + MyCompB:=Mysystem.create; + + connect(MyCompB:messagePort, MyCompA:messagePort); //not allowed messageports are output + //connect(self:messagePort, self:messagePort); + + messagePort.send(5); + + } + + control{ + execute(TC_NegSem_210101_connect_operation_002()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Port type `@NegSem_210101_connect_operation_002.myport' does not have any outgoing message types +<END_RESULT> + +<END_TC> +:exmp + *---------------------------------------------------------------------* :h3. NegSem_210101_map_operation_002 negative test .*---------------------------------------------------------------------* diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn index 1944a333dced7511a35a83a8ce226cb2124bec35..2d9b8eb717decaf17ab4e5fec80f58f9e8c9ff4c 100644 --- a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn @@ -33,29 +33,31 @@ module Sem_060302_structured_types_006 { var IntegerList v_list1:={0,-}; var ShortIntegerList v_list2; - var RecordType v_rec1; - var UnorderedIntegerList v_ulist1:={1,-}; - var ShortUnorderedIntegerList v_ulist2; - var SetType v_set1; - var integer v_matcher[2]; + var integer v_matcher[2]; //<-- array unbound assigent is problimatic v_matcher[0] := 1; - - var boolean v_check1; - - v_list1:=v_matcher; - v_list2:=v_list1; + log(v_list1); + log(v_matcher); - v_check1 := (v_list2[0]==1); - - if ( v_check1 ) + v_list1:=v_matcher; + v_list2:=v_list1; + + var boolean v_check1 := (v_list2[0]==1); + + if ( v_check1 ) { setverdict(pass); } else { setverdict(fail); } + + //var RecordType v_rec1; + //var UnorderedIntegerList v_ulist1:={1,-}; + //var ShortUnorderedIntegerList v_ulist2; + //var SetType v_set1; + } control{ diff --git a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_002.ttcn b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_002.ttcn index 704b43606e56c83ca84aa6ed219681a019bcaabd..f8c9ba00570084a02dd85e4dbd5cfdc1f82da2e0 100644 --- a/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_002.ttcn +++ b/conformance_test/core_language_tests/positive_tests/21_configuration_operations/2101_connection_operations/210101_connect_and_map_operations/NegSem_210101_connect_operation_002.ttcn @@ -26,8 +26,8 @@ module NegSem_210101_connect_operation_002{ MyCompA:=Mysystem.create; MyCompB:=Mysystem.create; - //connect(MyCompA:messagePort, MyCompB:messagePort); //not allowed messageports are output - connect(self:messagePort, self:messagePort); + connect(MyCompB:messagePort, MyCompA:messagePort); //not allowed messageports are output + //connect(self:messagePort, self:messagePort); messagePort.send(5); diff --git a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg index ea1faf55c4fd7b7cb707a856a2ee55a4b55bd2d0..668250868e86e1536d7680f1a48831741ae4cfba 100644 --- a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg +++ b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.cfg @@ -784,6 +784,7 @@ Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_001.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_002.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_006.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.control +Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.control Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.control Sem_160101_invoking_functions_001.control @@ -1304,6 +1305,7 @@ Sem_B010205_value_range_004.control Sem_B010205_value_range_005.control Sem_B010205_value_range_006.control Sem_B010205_value_range_007.control +Sem_B010205_value_range_008.control Sem_B010206_superset_001.control Sem_B010206_superset_002.control Sem_B010206_superset_003.control diff --git a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd index 145df060a130d00149507c59b65342f1f3ff3aac..8e39d48deaf416ab77daa622d2a1fecf9b6a586e 100644 --- a/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd +++ b/conformance_test/core_language_tests/positive_tests/pos_conf_tests.tpd @@ -2044,7 +2044,7 @@ <!-- <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_009.ttcn"/>--> <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_010.ttcn"/> <!-- <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_011.ttcn"/>--> -<!-- <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn"/>--> + <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_012.ttcn"/> <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_013.ttcn"/> <FileResource projectRelativePath="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn" relativeURI="15_templates/1511_concatenating_templates_of_string_and_list_types/Sem_1511_ConcatenatingTemplatesOfStringAndListTypes_014.ttcn"/> <!-- <FileResource projectRelativePath="15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn" relativeURI="15_templates/15_toplevel/NegSem_15_TopLevel_001.ttcn"/>--> @@ -3222,7 +3222,7 @@ <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_005.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_006.ttcn"/> <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_007.ttcn"/> -<!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn"/>--> + <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010205_value_range/Sem_B010205_value_range_008.ttcn"/> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_001.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_002.ttcn"/>--> <!-- <FileResource projectRelativePath="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn" relativeURI="B_matching_incoming_values/B01_template_matching/B0102_matching_mechanisms/B010206_superset/NegSem_B010206_superset_003.ttcn"/>--> diff --git a/usrguide/SoC_TITAN.docx b/usrguide/SoC_TITAN.docx index bf8e7d7f9e75100e8f6b43fcafc184a24d3ad326..63dc242ad1ad2fb26fab28d1b3c009074f2cd57c 100644 Binary files a/usrguide/SoC_TITAN.docx and b/usrguide/SoC_TITAN.docx differ