[svn-commits] tilghman: trunk r251881 - /trunk/tests/test_stringfields.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 11 14:29:23 CST 2010


Author: tilghman
Date: Thu Mar 11 14:29:19 2010
New Revision: 251881

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=251881
Log:
Fix tests on 32-bit systems.

Modified:
    trunk/tests/test_stringfields.c

Modified: trunk/tests/test_stringfields.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_stringfields.c?view=diff&rev=251881&r1=251880&r2=251881
==============================================================================
--- trunk/tests/test_stringfields.c (original)
+++ trunk/tests/test_stringfields.c Thu Mar 11 14:29:19 2010
@@ -107,7 +107,7 @@
 
 	if (AST_STRING_FIELD_ALLOCATION(test_struct.string1) != strlen("elephant") + 1) {
 		ast_test_status_update(test, "string1 has allocation area of %hu but we expect %lu\n",
-				AST_STRING_FIELD_ALLOCATION(test_struct.string1), strlen("elephant") + 1);
+				AST_STRING_FIELD_ALLOCATION(test_struct.string1), (unsigned long) strlen("elephant") + 1);
 		goto error;
 	} else {
 		ast_test_status_update(test, "string1 has the allocation area we expect: %hu\n", AST_STRING_FIELD_ALLOCATION(test_struct.string1));
@@ -115,7 +115,7 @@
 
 	if (AST_STRING_FIELD_ALLOCATION(test_struct.string2) != strlen("hippopotamus") + 1) {
 		ast_test_status_update(test, "string2 has allocation area of %hu but we expect %lu\n",
-				AST_STRING_FIELD_ALLOCATION(test_struct.string2), strlen("hippopotamus") + 1);
+				AST_STRING_FIELD_ALLOCATION(test_struct.string2), (unsigned long) strlen("hippopotamus") + 1);
 		goto error;
 	} else {
 		ast_test_status_update(test, "string2 has the allocation area we expect: %hu\n", AST_STRING_FIELD_ALLOCATION(test_struct.string2));
@@ -212,7 +212,7 @@
 
 	if (AST_STRING_FIELD_ALLOCATION(test_struct.string2) != strlen("hippopotamus face") + 1) {
 		ast_test_status_update(test, "The allocation amount is incorrect for string2. We expect %lu but it has %hu\n",
-				strlen("hippopotamus face"), AST_STRING_FIELD_ALLOCATION(test_struct.string2) + 1);
+				(unsigned long) strlen("hippopotamus face"), AST_STRING_FIELD_ALLOCATION(test_struct.string2) + 1);
 		goto error;
 	} else {
 		ast_test_status_update(test, "The allocation amount successfully increased for string2 when it grew\n");
@@ -246,7 +246,7 @@
 
 	if (AST_STRING_FIELD_ALLOCATION(test_struct.string1) != strlen(LONG_STRING) + 1) {
 		ast_test_status_update(test, "The string field allocation for string1 indicates a length of %hu instead of the expected %lu\n",
-				AST_STRING_FIELD_ALLOCATION(test_struct.string1), strlen(LONG_STRING) + 1);
+				AST_STRING_FIELD_ALLOCATION(test_struct.string1), (unsigned long) strlen(LONG_STRING) + 1);
 		goto error;
 	} else {
 		ast_test_status_update(test, "The stored allocation size of string1 is what we expect\n");




More information about the svn-commits mailing list