changeset 1438:7c60cb0ac8c8

testmesg: improve comments and msg cleanup
author Luke Mewburn <luke@mewburn.net>
date Fri, 21 Feb 2020 14:30:16 +1100
parents 0a80278df21f
children acc7262af8fa
files tests/testmesg.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/testmesg.c	Thu Feb 20 15:46:20 2020 +1100
+++ b/tests/testmesg.c	Fri Feb 21 14:30:16 2020 +1100
@@ -164,6 +164,8 @@
 
 		/* Create the instance, using the templates */
 		CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) );
+
+/* TODO: Do we need this recreated? acr is not used again . */
 	}
 	
 	/* Now let's create some additional Dictionary objects for the test */
@@ -700,7 +702,7 @@
 			struct avp 	   * grouped = NULL;
 			struct avp_hdr     * avpdata = NULL;
 			
-			/* Now find the ACR dictionary object */
+			/* Now find the Test f32 AVP dictionary object */
 			CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "AVP Test - no vendor - f32", &avp_model, ENOENT ) );
 			
 			CPYBUF();
@@ -1115,6 +1117,8 @@
 				fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1));
 				
 				TODO("Check the Failed-AVP is as expected");
+
+				CHECK( 0, fd_msg_free( msg ) );
 			}
 			
 		}
@@ -1509,7 +1513,7 @@
 			CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) );
 
 			/* Add a session id */
-			CHECK( 0, fd_msg_new_session( msg, (os0_t)"tm2", strlen("tm2") ) );
+			CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) );
 
 			/* Find the DICT_TYPE Enumerated(Result-Code) */
 			struct dict_object * restype = NULL;
@@ -1553,7 +1557,7 @@
 			CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) );
 
 			/* Add a session id */
-			CHECK( 0, fd_msg_new_session( msg, (os0_t)"tm2", strlen("tm2") ) );
+			CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) );
 
 			/* Find the DICT_TYPE Enumerated(73565/Experimental-Result-Code) */
 			struct dict_object * restype = NULL;
"Welcome to our mercurial repository"