[asterisk-commits] kmoore: trunk r403095 - in /trunk: ./ tests/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 22 17:57:46 CST 2013


Author: kmoore
Date: Fri Nov 22 17:57:45 2013
New Revision: 403095

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=403095
Log:
Make sure unit tests compile

This fixes the unit tests that were broken by r403069 and several
functions requiring a new parameter for sanitization of JSON messages
generated from object snapshots.
........

Merged revisions 403094 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/tests/test_stasis.c
    trunk/tests/test_stasis_channels.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Nov 22 17:57:45 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402993,403016,403022,403069,403082
+/branches/12:1-398558,398560-398577,398579-399305,399307-401390,401392-402993,403016,403022,403069,403082,403094

Modified: trunk/tests/test_stasis.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_stasis.c?view=diff&rev=403095&r1=403094&r2=403095
==============================================================================
--- trunk/tests/test_stasis.c (original)
+++ trunk/tests/test_stasis.c Fri Nov 22 17:57:45 2013
@@ -41,7 +41,7 @@
 
 static const char *test_category = "/stasis/core/";
 
-static struct ast_json *fake_json(struct stasis_message *message)
+static struct ast_json *fake_json(struct stasis_message *message, const struct stasis_message_sanitizer *sanitize)
 {
 	const char *text = stasis_message_data(message);
 
@@ -1100,7 +1100,7 @@
 	}
 
 	/* Test NULL */
-	actual = stasis_message_to_json(NULL);
+	actual = stasis_message_to_json(NULL, NULL);
 	ast_test_validate(test, NULL == actual);
 
 	/* Test message with NULL to_json function */
@@ -1111,7 +1111,7 @@
 	uut = stasis_message_create(type, data);
 	ast_test_validate(test, NULL != uut);
 
-	actual = stasis_message_to_json(uut);
+	actual = stasis_message_to_json(uut, NULL);
 	ast_test_validate(test, NULL == actual);
 
 	return AST_TEST_PASS;
@@ -1145,7 +1145,7 @@
 	ast_test_validate(test, NULL != uut);
 
 	expected = ast_json_string_create(expected_text);
-	actual = stasis_message_to_json(uut);
+	actual = stasis_message_to_json(uut, NULL);
 	ast_test_validate(test, ast_json_equal(expected, actual));
 
 	return AST_TEST_PASS;

Modified: trunk/tests/test_stasis_channels.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_stasis_channels.c?view=diff&rev=403095&r1=403094&r2=403095
==============================================================================
--- trunk/tests/test_stasis_channels.c (original)
+++ trunk/tests/test_stasis_channels.c Fri Nov 22 17:57:45 2013
@@ -248,14 +248,14 @@
 		break;
 	}
 
-	ast_test_validate(test, NULL == ast_channel_snapshot_to_json(NULL));
+	ast_test_validate(test, NULL == ast_channel_snapshot_to_json(NULL, NULL));
 
 	chan = ast_channel_alloc(0, AST_STATE_DOWN, "cid_num", "cid_name", "acctcode", "exten", "context", NULL, 0, "TEST/name");
 	ast_test_validate(test, NULL != chan);
 	snapshot = ast_channel_snapshot_create(chan);
 	ast_test_validate(test, NULL != snapshot);
 
-	actual = ast_channel_snapshot_to_json(snapshot);
+	actual = ast_channel_snapshot_to_json(snapshot, NULL);
 	expected = ast_json_pack("{ s: s, s: s, s: s, s: s,"
 				 "  s: { s: s, s: s, s: i },"
 				 "  s: { s: s, s: s },"




More information about the asterisk-commits mailing list