[svn-commits] dvossel: branch dvossel/fixtheworld_phase1_step1 r298772 - /team/dvossel/fixt...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Dec 17 17:14:25 UTC 2010


Author: dvossel
Date: Fri Dec 17 11:14:21 2010
New Revision: 298772

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=298772
Log:
Another update to format capability unit test

Modified:
    team/dvossel/fixtheworld_phase1_step1/tests/test_format_api.c

Modified: team/dvossel/fixtheworld_phase1_step1/tests/test_format_api.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/fixtheworld_phase1_step1/tests/test_format_api.c?view=diff&rev=298772&r1=298771&r2=298772
==============================================================================
--- team/dvossel/fixtheworld_phase1_step1/tests/test_format_api.c (original)
+++ team/dvossel/fixtheworld_phase1_step1/tests/test_format_api.c Fri Dec 17 11:14:21 2010
@@ -479,6 +479,32 @@
 		goto test3_cleanup;
 	}
 
+	/* lets test getting joint formats by type */
+	ast_cap_destroy(cap_joint);
+	if (!(cap_joint = ast_cap_get_type(cap1, AST_FORMATNEW_TYPE_VIDEO))) {
+		ast_test_status_update(test, "ast_cap_get_type failed.\n");
+		res = AST_TEST_FAIL;
+		goto test3_cleanup;
+	}
+	/* lets make sure our joint capability structure has what we expect */
+	if (!ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_H264, 0)) ||
+		!ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_H263, 0))) {
+		ast_test_status_update(test, "get_type failed 2.\n");
+		res = AST_TEST_FAIL;
+		goto test3_cleanup;
+	}
+	/* now make sure joint does not have anything but video */
+	if (ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_ALAW, 0)) ||
+		ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_ULAW, 0)) ||
+		ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_GSM, 0)) ||
+		ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_JPEG, 0)) ||
+		ast_cap_iscompatible(cap_joint, ast_format_set(&tmpformat, AST_FORMATNEW_T140, 0))) {
+		ast_test_status_update(test, "get_type failed 3.\n");
+		res = AST_TEST_FAIL;
+		goto test3_cleanup;
+	}
+
+
 test3_cleanup:
 	ast_cap_destroy(cap1);
 	ast_cap_destroy(cap2);




More information about the svn-commits mailing list