Skip to content
Snippets Groups Projects
Commit 32cf0a28 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

changed invalid module parameter references to cause module parameter errors...

changed invalid module parameter references to cause module parameter errors instead of dynamic test case errors (bug 506066)

Change-Id: I28ce74fd2710e355fb2a4f655f071d1b79a73609
Signed-off-by: default avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent d7090e81
No related branches found
No related tags found
No related merge requests found
...@@ -204,7 +204,8 @@ void Module_List::set_param(Module_Param& param) ...@@ -204,7 +204,8 @@ void Module_List::set_param(Module_Param& param)
} }
#ifdef TITAN_RUNTIME_2 #ifdef TITAN_RUNTIME_2
Module_Param* Module_List::get_param(Module_Param_Name& param_name) Module_Param* Module_List::get_param(Module_Param_Name& param_name,
const Module_Param* caller)
{ {
// The first segment in the parameter name can either be the module name, // The first segment in the parameter name can either be the module name,
// or the module parameter name - both must be checked // or the module parameter name - both must be checked
...@@ -239,22 +240,22 @@ Module_Param* Module_List::get_param(Module_Param_Name& param_name) ...@@ -239,22 +240,22 @@ Module_Param* Module_List::get_param(Module_Param_Name& param_name)
// Still not found -> error // Still not found -> error
if (param == NULL) { if (param == NULL) {
if (module_ptr == NULL) { if (module_ptr == NULL) {
TTCN_error("Referenced module parameter cannot be found. Module `%s' does not exist, " caller->error("Referenced module parameter cannot be found. Module `%s' does not exist, "
"and no parameter with name `%s' exists in any module.", "and no parameter with name `%s' exists in any module.",
first_name, first_name); first_name, first_name);
} else if (module_ptr->get_param_func == NULL) { } else if (module_ptr->get_param_func == NULL) {
TTCN_error("Referenced module parameter cannot be found. Module `%s' does not have " caller->error("Referenced module parameter cannot be found. Module `%s' does not have "
"parameters, and no parameter with name `%s' exists in other modules.", "parameters, and no parameter with name `%s' exists in other modules.",
first_name, first_name); first_name, first_name);
} else { } else {
TTCN_error("Referenced module parameter cannot be found. No parameter with name `%s' " caller->error("Referenced module parameter cannot be found. No parameter with name `%s' "
"exists in module `%s', and no parameter with name `%s' exists in any module.", "exists in module `%s', and no parameter with name `%s' exists in any module.",
second_name, first_name, first_name); second_name, first_name, first_name);
} }
} }
else if (param->get_type() == Module_Param::MP_Unbound) { else if (param->get_type() == Module_Param::MP_Unbound) {
delete param; delete param;
TTCN_error("Referenced module parameter '%s' is unbound.", param_name.get_str()); caller->error("Referenced module parameter '%s' is unbound.", param_name.get_str());
} }
return param; return param;
......
...@@ -53,7 +53,8 @@ public: ...@@ -53,7 +53,8 @@ public:
static void set_param(Module_Param& param); static void set_param(Module_Param& param);
#ifdef TITAN_RUNTIME_2 #ifdef TITAN_RUNTIME_2
static Module_Param* get_param(Module_Param_Name& param_name); static Module_Param* get_param(Module_Param_Name& param_name,
const Module_Param* caller);
#endif #endif
static void log_param(); static void log_param();
......
...@@ -331,7 +331,7 @@ Module_Param_Ptr Module_Param_Reference::get_referenced_param() const { ...@@ -331,7 +331,7 @@ Module_Param_Ptr Module_Param_Reference::get_referenced_param() const {
error("References to other variables are not allowed."); error("References to other variables are not allowed.");
} }
mp_ref->reset(); mp_ref->reset();
Module_Param_Ptr ptr = Module_List::get_param(*mp_ref); Module_Param_Ptr ptr = Module_List::get_param(*mp_ref, this);
ptr.set_temporary(); ptr.set_temporary();
return ptr; return ptr;
} }
......
...@@ -1585,74 +1585,71 @@ tsp_union := ENUM_1 ...@@ -1585,74 +1585,71 @@ tsp_union := ENUM_1
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_integer' (?im)Error while setting parameter field 'tsp_integer'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_float' (?im)Error while setting parameter field 'tsp_float'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_boolean' (?im)Error while setting parameter field 'tsp_boolean'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_objid' (?im)Error while setting parameter field 'tsp_objid'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_verdict' (?im)Error while setting parameter field 'tsp_verdict'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_bitstring' (?im)Error while setting parameter field 'tsp_bitstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_hexstring' (?im)Error while setting parameter field 'tsp_hexstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_octetstring' (?im)Error while setting parameter field 'tsp_octetstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_charstring' (?im)Error while setting parameter field 'tsp_charstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_universal_charstring' (?im)Error while setting parameter field 'tsp_universal_charstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 28> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_enumerated' (?im)Error while setting parameter field 'tsp_enumerated'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_record' (?im)Error while setting parameter field 'tsp_record'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_record.nonexistent1' (?im)Error while setting parameter field 'tsp_record.nonexistent1'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_record_of' (?im)Error while setting parameter field 'tsp_record_of'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_set' (?im)Error while setting parameter field 'tsp_set'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_set.nonexistent1' (?im)Error while setting parameter field 'tsp_set.nonexistent1'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_set_of' (?im)Error while setting parameter field 'tsp_set_of'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_anytype' (?im)Error while setting parameter field 'tsp_anytype'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_anytype.field3' (?im)Error while setting parameter field 'tsp_anytype.field3'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_union' (?im)Error while setting parameter field 'tsp_union'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_union.field3' (?im)Error while setting parameter field 'tsp_union.field3'
<END_RESULT> <END_RESULT>
<RESULT COUNT 1> <RESULT COUNT 1>
(?im)Test execution summary: 0 test case was executed. Overall verdict: error (?im)Test execution summary: 0 test case was executed. Overall verdict: none
<END_RESULT>
<RESULT COUNT 16>
Dynamic test case error: Referenced module parameter cannot be found.
<END_RESULT> <END_RESULT>
<RESULT COUNT 1> <RESULT COUNT 1>
...@@ -1810,7 +1807,7 @@ tsp_anytype &= {integer := 3} ...@@ -1810,7 +1807,7 @@ tsp_anytype &= {integer := 3}
[EXECUTE] [EXECUTE]
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_ROI' (?im)Error while concatenating parameter field 'tsp_ROI'
<END_RESULT> <END_RESULT>
<RESULT COUNT 4> <RESULT COUNT 4>
...@@ -1822,7 +1819,7 @@ Temp.control ...@@ -1822,7 +1819,7 @@ Temp.control
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_ROROI\[0\]' (?im)Error while setting parameter field 'tsp_ROROI\[0\]'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_SOI' (?im)Error while concatenating parameter field 'tsp_SOI'
<END_RESULT> <END_RESULT>
<RESULT COUNT 4> <RESULT COUNT 4>
...@@ -1876,9 +1873,6 @@ Temp.control ...@@ -1876,9 +1873,6 @@ Temp.control
<RESULT COUNT 4> <RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_anytype' (?im)Error while concatenating parameter field 'tsp_anytype'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found.
<END_RESULT>
<END_TC> <END_TC>
...@@ -2224,70 +2218,67 @@ tsp_union := ENUM_1 ...@@ -2224,70 +2218,67 @@ tsp_union := ENUM_1
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_integer' (?im)Error while setting parameter field 'tsp_integer'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_float' (?im)Error while setting parameter field 'tsp_float'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_boolean' (?im)Error while setting parameter field 'tsp_boolean'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_objid' (?im)Error while setting parameter field 'tsp_objid'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_verdict' (?im)Error while setting parameter field 'tsp_verdict'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_bitstring' (?im)Error while setting parameter field 'tsp_bitstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_hexstring' (?im)Error while setting parameter field 'tsp_hexstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_octetstring' (?im)Error while setting parameter field 'tsp_octetstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_charstring' (?im)Error while setting parameter field 'tsp_charstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_universal_charstring' (?im)Error while setting parameter field 'tsp_universal_charstring'
<END_RESULT> <END_RESULT>
<RESULT COUNT 28> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_enumerated' (?im)Error while setting parameter field 'tsp_enumerated'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_record' (?im)Error while setting parameter field 'tsp_record'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_record.nonexistent1' (?im)Error while setting parameter field 'tsp_record.nonexistent1'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_record_of' (?im)Error while setting parameter field 'tsp_record_of'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while setting parameter field 'tsp_set' (?im)Error while setting parameter field 'tsp_set'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_set.nonexistent1' (?im)Error while setting parameter field 'tsp_set.nonexistent1'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_set_of' (?im)Error while setting parameter field 'tsp_set_of'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_anytype' (?im)Error while setting parameter field 'tsp_anytype'
<END_RESULT> <END_RESULT>
<RESULT COUNT 24> <RESULT COUNT 26>
(?im)Error while setting parameter field 'tsp_union' (?im)Error while setting parameter field 'tsp_union'
<END_RESULT> <END_RESULT>
<RESULT COUNT 1> <RESULT COUNT 1>
(?im)There were errors during configuring HCs. (?im)There were errors during configuring HCs.
<END_RESULT> <END_RESULT>
<RESULT COUNT 16>
Dynamic test case error: Referenced module parameter cannot be found.
<END_RESULT>
<RESULT COUNT 1> <RESULT COUNT 1>
<END_RESULT> <END_RESULT>
...@@ -2444,7 +2435,7 @@ tsp_anytype &= {integer := 3} ...@@ -2444,7 +2435,7 @@ tsp_anytype &= {integer := 3}
[EXECUTE] [EXECUTE]
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_ROI' (?im)Error while concatenating parameter field 'tsp_ROI'
<END_RESULT> <END_RESULT>
<RESULT COUNT 4> <RESULT COUNT 4>
...@@ -2456,7 +2447,7 @@ Temp.control ...@@ -2456,7 +2447,7 @@ Temp.control
<RESULT COUNT 2> <RESULT COUNT 2>
(?im)Error while setting parameter field 'tsp_ROROI\[0\]' (?im)Error while setting parameter field 'tsp_ROROI\[0\]'
<END_RESULT> <END_RESULT>
<RESULT COUNT 26> <RESULT COUNT 28>
(?im)Error while concatenating parameter field 'tsp_SOI' (?im)Error while concatenating parameter field 'tsp_SOI'
<END_RESULT> <END_RESULT>
<RESULT COUNT 4> <RESULT COUNT 4>
...@@ -2510,9 +2501,6 @@ Temp.control ...@@ -2510,9 +2501,6 @@ Temp.control
<RESULT COUNT 4> <RESULT COUNT 4>
(?im)Error while concatenating parameter field 'tsp_anytype' (?im)Error while concatenating parameter field 'tsp_anytype'
<END_RESULT> <END_RESULT>
<RESULT COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found.
<END_RESULT>
<END_TC> <END_TC>
......
...@@ -1302,8 +1302,8 @@ control{} ...@@ -1302,8 +1302,8 @@ control{}
[EXECUTE] [EXECUTE]
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT IF_PASS COUNT 1> <RESULT IF_PASS COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found. Error while setting parameter field
<END_RESULT> <END_RESULT>
<END_TC> <END_TC>
...@@ -1333,8 +1333,8 @@ DEF_1:={ f3:=${DEF_1_f} } ...@@ -1333,8 +1333,8 @@ DEF_1:={ f3:=${DEF_1_f} }
[MODULE_PARAMETERS] [MODULE_PARAMETERS]
tsp_1 := ${DEF_1} tsp_1 := ${DEF_1}
<END_MODULE> <END_MODULE>
<RESULT IF_PASS COUNT 1> <RESULT IF_PASS COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found. Error while setting parameter field
<END_RESULT> <END_RESULT>
<END_TC> <END_TC>
...@@ -1680,8 +1680,8 @@ control{} ...@@ -1680,8 +1680,8 @@ control{}
[EXECUTE] [EXECUTE]
Temp.control Temp.control
<END_MODULE> <END_MODULE>
<RESULT IF_PASS COUNT 1> <RESULT IF_PASS COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found. Error while setting parameter field
<END_RESULT> <END_RESULT>
<END_TC> <END_TC>
...@@ -1711,8 +1711,8 @@ DEF_1:={ f3:=${DEF_1_f} } ...@@ -1711,8 +1711,8 @@ DEF_1:={ f3:=${DEF_1_f} }
[MODULE_PARAMETERS] [MODULE_PARAMETERS]
tsp_1 := ${DEF_1} tsp_1 := ${DEF_1}
<END_MODULE> <END_MODULE>
<RESULT IF_PASS COUNT 1> <RESULT IF_PASS COUNT 2>
Dynamic test case error: Referenced module parameter cannot be found. Error while setting parameter field
<END_RESULT> <END_RESULT>
<END_TC> <END_TC>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment