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 85f9fd3ee8a1813cdc9774c5f15d0c6598b65ee1..b2edfbff374befb8a1d48f3cc49cf090ea12f444 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 @@ -6008,7 +6008,7 @@ module NegSem_060207_arrays_011 { <END_MODULE> <RESULT COUNT 1> -error: Reference to a constant value was expected instead of the return value of function `@NegSem_060207_arrays_011.f' +error: Reference to a static value was expected instead of the return value of function `@NegSem_060207_arrays_011.f' <END_RESULT> <END_TC> @@ -6061,7 +6061,7 @@ module NegSem_060207_arrays_012 { <END_MODULE> <RESULT COUNT 1> -error: Reference to a constant value was expected instead of the return value of function `@NegSem_060207_arrays_012.f' +error: Reference to a static value was expected instead of the return value of function `@NegSem_060207_arrays_012.f' <END_RESULT> <END_TC> @@ -8078,6 +8078,299 @@ error: Runs on clause mismatch: A definition that runs on component type `@NegSe <END_TC> :exmp +*---------------------------------------------------------------------* +:h3. NegSem_060303_component_types_003 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060303_003 Ensure that the IUT correctly handles component compatibility of different runs on clauses > + +<COMPILE> + +<MODULE TTCN NegSem_060303_component_types_003 NegSem_060303_component_types_003.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different runs on clauses + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Runs on compatibility: a function or altstep referring to component type "A" in its runs on clause may be +//called or started on a component instance of type 'B' if all the definitions of "A" have identical definitions in +//"B". + +module NegSem_060303_component_types_003 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralCompEx { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_003() runs on GeneralComp { + f_test(); // is not allowed, because GeneralComp is not compatible with the "runs on" of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_003()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Runs on clause mismatch: A definition that runs on component type `@NegSem_060303_component_types_003.GeneralComp' cannot call function `@NegSem_060303_component_types_003.f_test', which runs on `@NegSem_060303_component_types_003.GeneralCompEx' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_060303_component_types_004 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060303_004 Ensure that the IUT correctly handles component compatibility of mtc and runs on clause > + +<COMPILE> + +<MODULE TTCN NegSem_060303_component_types_004 NegSem_060303_component_types_004.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Mtc compatibility: a function or altstep referring to component type "A" in its mtc clause may be called or +// started in any context that has a mtc clause of type "B" or a testcase with a runs on clause of type "B" if all the +// port definitions of "A" have identical definitions in "B". If the type of the mtc is unknown in the calling +// function, this can lead to runtime errors if the component type "A" is not mtc-compatible with the type of the +// running mtc. + +module NegSem_060303_component_types_004 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp mtc GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_004() runs on GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the mtc of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_004()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Mtc clause mismatch: A definition that runs on component type `@NegSem_060303_component_types_004.GeneralCompEx' cannot call function `@NegSem_060303_component_types_004.f_test', which mtc clause is `@NegSem_060303_component_types_004.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_060303_component_types_005 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060303_005 Ensure that the IUT correctly handles component compatibility of mtc and runs on clause > + +<COMPILE> + +<MODULE TTCN NegSem_060303_component_types_005 NegSem_060303_component_types_005.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Mtc compatibility: a function or altstep referring to component type "A" in its mtc clause may be called or +// started in any context that has a mtc clause of type "B" or a testcase with a runs on clause of type "B" if all the +// port definitions of "A" have identical definitions in "B". If the type of the mtc is unknown in the calling +// function, this can lead to runtime errors if the component type "A" is not mtc-compatible with the type of the +// running mtc. + +module NegSem_060303_component_types_005 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp mtc GeneralCompEx { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_005() runs on GeneralComp { + f_test(); // is not allowed, because GeneralComp is not compatible with the mtc of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_005()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: Mtc clause mismatch: A definition that runs on component type `@NegSem_060303_component_types_005.GeneralComp' cannot call function `@NegSem_060303_component_types_005.f_test', which mtc clause is `@NegSem_060303_component_types_005.GeneralCompEx' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_060303_component_types_006 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060303_006 Ensure that the IUT correctly handles component compatibility of system and runs on clause > + +<COMPILE> + +<MODULE TTCN NegSem_060303_component_types_006 NegSem_060303_component_types_006.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module NegSem_060303_component_types_006 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_006() runs on GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the system of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_006()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: System clause mismatch: A definition with system component type `@NegSem_060303_component_types_006.GeneralCompEx' cannot call function `@NegSem_060303_component_types_006.f_test', which system clause is `@NegSem_060303_component_types_006.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + +*---------------------------------------------------------------------* +:h3. NegSem_060303_component_types_007 negative test +.*---------------------------------------------------------------------* +:xmp tab=0. + +<TC - 060303_007 Ensure that the IUT correctly handles component compatibility of system and runs on clause > + +<COMPILE> + +<MODULE TTCN NegSem_060303_component_types_007 NegSem_060303_component_types_007.ttcn > +/****************************************************************************** + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module NegSem_060303_component_types_007 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_007() runs on GeneralComp system GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the system of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_007()); + } +} +<END_MODULE> + +<RESULT COUNT 1> +error: System clause mismatch: A definition with system component type `@NegSem_060303_component_types_007.GeneralCompEx' cannot call function `@NegSem_060303_component_types_007.f_test', which system clause is `@NegSem_060303_component_types_007.GeneralComp' +<END_RESULT> + +<END_TC> +:exmp + .*---------------------------------------------------------------------* :h1.References .*---------------------------------------------------------------------* 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 f0ab1f9b663982c2e9cd2f68af2bb0ff2d6a5f50..61f7a8e696c7ca0135d0f734012ee00caf958640 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 @@ -2135,7 +2135,7 @@ module NegSem_10_Constants_001 { <END_MODULE> <RESULT COUNT 1> -error: An evaluable constant value was expected instead of operation `rnd \(seed\)' +error: A static value was expected instead of operation `rnd \(seed\)' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script b/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script index a4ac1a092307db3b8d69a3f08e14616de91b1d65..68460148b179e4140c8f9d9cee8795b59c68089d 100644 --- a/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script +++ b/conformance_test/core_language_tests/negative_tests/23-27-B_folders.script @@ -2001,7 +2001,7 @@ module NegSem_24_toplevel_001 { <END_MODULE> <RESULT COUNT 1> -error: An evaluable constant value was expected instead of operation `getverdict\(\)' +error: A static value was expected instead of operation `getverdict\(\)' <END_RESULT> <END_TC> diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7e2d7d11ef7815f54f74ef74e3f8ed1f910479ab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn @@ -0,0 +1,42 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different runs on clauses + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Runs on compatibility: a function or altstep referring to component type "A" in its runs on clause may be +//called or started on a component instance of type 'B' if all the definitions of "A" have identical definitions in +//"B". + +module NegSem_060303_component_types_003 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralCompEx { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_003() runs on GeneralComp { + f_test(); // is not allowed, because GeneralComp is not compatible with the "runs on" of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..c87ce2527ae78705f164579955b7dc418ac3c923 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Mtc compatibility: a function or altstep referring to component type "A" in its mtc clause may be called or +// started in any context that has a mtc clause of type "B" or a testcase with a runs on clause of type "B" if all the +// port definitions of "A" have identical definitions in "B". If the type of the mtc is unknown in the calling +// function, this can lead to runtime errors if the component type "A" is not mtc-compatible with the type of the +// running mtc. + +module NegSem_060303_component_types_004 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp mtc GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_004() runs on GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the mtc of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_004()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2a104f896785c1543ac70f0b3fa640e7ffa037cc --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Mtc compatibility: a function or altstep referring to component type "A" in its mtc clause may be called or +// started in any context that has a mtc clause of type "B" or a testcase with a runs on clause of type "B" if all the +// port definitions of "A" have identical definitions in "B". If the type of the mtc is unknown in the calling +// function, this can lead to runtime errors if the component type "A" is not mtc-compatible with the type of the +// running mtc. + +module NegSem_060303_component_types_005 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp mtc GeneralCompEx { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_005() runs on GeneralComp { + f_test(); // is not allowed, because GeneralComp is not compatible with the mtc of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..20645600c47c6569bfb9fa27bac8358e2b5f47fd --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module NegSem_060303_component_types_006 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_006() runs on GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the system of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_007.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_007.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..907897266de0ad3fa898daf580cab8f532e25294 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_007.ttcn @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module NegSem_060303_component_types_007 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx extends GeneralComp { + port P p2; + } + + function f_test() runs on GeneralComp system GeneralComp { + setverdict(fail); + } + + testcase TC_NegSem_060303_component_types_007() runs on GeneralComp system GeneralCompEx { + f_test(); // is not allowed, because GeneralCompEx is not compatible with the system of the function + setverdict(pass); + } + + control{ + execute(TC_NegSem_060303_component_types_007()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..304b39183ce1068d4ec097c257f21b5b7960f650 --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn @@ -0,0 +1,43 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different runs on clauses + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Runs on compatibility: a function or altstep referring to component type "A" in its runs on clause may be +//called or started on a component instance of type 'B' if all the definitions of "A" have identical definitions in +//"B". + +module Sem_060303_component_types_003 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p; + } + + type component GeneralCompEx { + port P p; + port P p2; + } + + function f_test() runs on GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_060303_component_types_003() runs on GeneralCompEx { + f_test(); // GeneralCompEx and GeneralComp are "runs on" compatible + setverdict(pass); + } + + control{ + execute(TC_Sem_060303_component_types_003()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..84e1f3ac467cdb72cf1f45673a468f831c13b8df --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of mtc and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +// Mtc compatibility: a function or altstep referring to component type "A" in its mtc clause may be called or +// started in any context that has a mtc clause of type "B" or a testcase with a runs on clause of type "B" if all the +// port definitions of "A" have identical definitions in "B". If the type of the mtc is unknown in the calling +// function, this can lead to runtime errors if the component type "A" is not mtc-compatible with the type of the +// running mtc. + +module Sem_060303_component_types_004 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p1; + port P p2; + } + + type component GeneralCompEx { + port P p1; + port P p2; + } + + function f_test() runs on GeneralComp mtc GeneralCompEx { + setverdict(pass); + } + + testcase TC_Sem_060303_component_types_004() runs on GeneralComp { + f_test(); // GeneralCompEx and GeneralComp are mtc compatible + setverdict(pass); + } + + control{ + execute(TC_Sem_060303_component_types_004()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..864189ae703193116abd5af3708fee6ca6cbcaab --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of system and runs on clause + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module Sem_060303_component_types_005 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p1; + port P p2; + } + + type component GeneralCompEx { + port P p1; + port P p2; + } + + function f_test() runs on GeneralCompEx system GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_060303_component_types_005() runs on GeneralCompEx { + f_test(); // GeneralCompEx and GeneralComp are system compatible + setverdict(pass); + } + + control{ + execute(TC_Sem_060303_component_types_005()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a701ad918a1215e242518c4bc4a75e1007008c8c --- /dev/null +++ b/conformance_test/core_language_tests/positive_tests/06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn @@ -0,0 +1,46 @@ +/****************************************************************************** + * Copyright (C) 2017 ETSI All Rights Reserved. + * + * Adrien Kirjak + * + ** @version 0.0.1 + ** @purpose 1:6.3.3, Ensure that the IUT correctly handles component compatibility of different system clauses + ** @verdict pass reject + ***************************************************/ + +// The following requirements are tested: +//System compatibility: a function or altstep referring to component type "A" in its system clause may be called +//or started in any context that has a system clause of type "B" or a test case with a runs on clause of type "B" +//and no system clause if all the port definitions of "A" have identical definitions in "B". If the type of the +//system is unknown in the calling function, this can lead to runtime errors if the component type "A" is not +//system-compatible with the type of the system the current test case was started on. + +module Sem_060303_component_types_006 { + + type port P message { + inout integer; + } with {extension "internal"} + + type component GeneralComp { + port P p1; + port P p2; + } + + type component GeneralCompEx { + port P p1; + port P p2; + } + + function f_test() runs on GeneralComp system GeneralComp { + setverdict(pass); + } + + testcase TC_Sem_060303_component_types_006() runs on GeneralComp system GeneralCompEx{ + f_test(); // GeneralCompEx and GeneralComp are system compatible + setverdict(pass); + } + + control{ + execute(TC_Sem_060303_component_types_006()); + } +} diff --git a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn index e6901b315c8e77419921c4ec408314f350b73c52..ca968aaa77f619c1d89d28fc062ec3d5906c4bed 100644 --- a/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn +++ b/conformance_test/core_language_tests/positive_tests/08_modules/0802_module_definitions_part/080203_importing_from_modules/08020301_general_format_of_import/NegSem_08020301_GeneralFormatOfImport_022.ttcn @@ -19,6 +19,7 @@ module NegSem_08020301_GeneralFormatOfImport_022 { import from NegSem_08020301_GeneralFormatOfImport_022_import { template m_test }; // PX_TEST should be undefined, because it is not automatically imported + const integer c_test := PX_TEST; type component GeneralComp {} 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 668250868e86e1536d7680f1a48831741ae4cfba..fd672910feb014fb46aff9b99ee1e903efdbb403 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 @@ -491,6 +491,9 @@ Sem_060302_structured_types_004.control Sem_060302_structured_types_005.control Sem_060303_component_types_001.control Sem_060303_component_types_002.control +Sem_060303_component_types_004.control +Sem_060303_component_types_005.control +Sem_060303_component_types_006.control Sem_070101_ArithmeticOperators_001.control Sem_070101_ArithmeticOperators_002.control Sem_070101_ArithmeticOperators_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 8e39d48deaf416ab77daa622d2a1fecf9b6a586e..1d7c49934eb5772e3dea3c922402a8eaf56c52be 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 @@ -1289,8 +1289,17 @@ <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060302_structured_types/Sem_060302_structured_types_006.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_001.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_002.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_003.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_004.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_005.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_006.ttcn"/>--> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_007.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/NegSem_060303_component_types_007.ttcn"/>--> <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_001.ttcn"/> <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_002.ttcn"/> +<!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_003.ttcn"/>--> + <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_004.ttcn"/> + <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_005.ttcn"/> + <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060303_component_types/Sem_060303_component_types_006.ttcn"/> <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_001.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_002.ttcn"/>--> <!-- <FileResource projectRelativePath="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn" relativeURI="06_types_and_values/0603_type_compatibility/060304_compatibility_of_communication_operations/NegSem_060304_compatibility_of_communication_operations_003.ttcn"/>--> diff --git a/usrguide/SoC_TITAN.docx b/usrguide/SoC_TITAN.docx index 1423220ee4697ceaca1032949d7928dc701d9dcc..d70672a68df079ae53133a2d1809c7fb84be2d5e 100644 Binary files a/usrguide/SoC_TITAN.docx and b/usrguide/SoC_TITAN.docx differ