diff --git a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn index 376f80d43af913aa70c3a88db15fa8b28e055e65..3c7886d3b7b91c06a56bc4d229550d47aba4a718 100644 --- a/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn +++ b/ttcn/AtsMec/AtsMec_Ams_TestCases.ttcn @@ -76,21 +76,9 @@ import from LibMec_Pixits all; ) } )))))) -> value v_response { - var boolean v_header_matched := false; - tc_ac.stop; - v_headers := v_response.response.header; - for (var integer v_idx := 0; v_idx < lengthof(v_headers); v_idx := v_idx + 1) { - if (v_headers[v_idx].header_name == "Location") { - if (match(v_headers[v_idx].header_value[0], "") == true) { - v_header_matched := true; - } // else, nothing to do - break; - } - } // End of 'for' statement - - if (v_header_matched == true) { + if (f_check_headers(v_response.response.header) == true) { log("*** " & testcasename() & ": PASS: IUT successfully responds with a AppTerminationNotificationSubscription ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { diff --git a/ttcn/LibCommon b/ttcn/LibCommon index 21bad7c51917d19bebdff5b36983e22922421976..8f0b6280029f2b786f289ee6cf671553a4806b17 160000 --- a/ttcn/LibCommon +++ b/ttcn/LibCommon @@ -1 +1 @@ -Subproject commit 21bad7c51917d19bebdff5b36983e22922421976 +Subproject commit 8f0b6280029f2b786f289ee6cf671553a4806b17 diff --git a/ttcn/LibIts b/ttcn/LibIts index e52379698e945eb9631b229c5438de9f74efb6a0..fa803fc714e8896de7ce12d0ecec822b5e8949dc 160000 --- a/ttcn/LibIts +++ b/ttcn/LibIts @@ -1 +1 @@ -Subproject commit e52379698e945eb9631b229c5438de9f74efb6a0 +Subproject commit fa803fc714e8896de7ce12d0ecec822b5e8949dc diff --git a/ttcn/LibMec/ttcn/LibMec_Functions.ttcn b/ttcn/LibMec/ttcn/LibMec_Functions.ttcn index 1969d84cef299b5e663b7d211aa7b680621e4685..98d017d9ce81508a6195f54e37ff95ab4a333352 100644 --- a/ttcn/LibMec/ttcn/LibMec_Functions.ttcn +++ b/ttcn/LibMec/ttcn/LibMec_Functions.ttcn @@ -114,9 +114,35 @@ module LibMec_Functions { group helpers { + /** + * @desc Check HTTP response headers + * @param p_headers The HTTP headers + * @param p_value the expected va;ue + * @return true on success, false otherwise + */ + function f_check_headers( + in HeaderLines p_headers, + in template (present) charstring p_value := ? + ) return boolean { + // Local variables + var boolean v_header_matched := false; + + for (var integer v_idx := 0; v_idx < lengthof(p_headers); v_idx := v_idx + 1) { + if (p_headers[v_idx].header_name == "Location") { + if (match(p_headers[v_idx].header_value[0], p_value) == true) { + v_header_matched := true; + } // else, nothing to do + break; + } + } // End of 'for' statement + + return v_header_matched; + } + /** * @desc Check if the user is registered or not - * @param + * @param p_ue_identity_tag The UE identity tag + * @param p_headers The HTTP headers * @return 0 if unregistered, 1 if registered, -1 otherwise */ function f_check_user_register_state(