Fixing system_wrappers unittests.

Not complete, but enough to include them in the build again.

Review URL: http://webrtc-codereview.appspot.com/241008

git-svn-id: http://webrtc.googlecode.com/svn/trunk@848 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2011-10-31 20:44:24 +00:00
parent 8885d22399
commit 84736882ad

View File

@ -31,11 +31,17 @@ int WebRtcDataLogCHelper_TestReturnLog() {
int WebRtcDataLogCHelper_TestCombine() {
const int kOutLen = strlen(kTableName) + 4; /* Room for "_17" + '\0' */
char combined_name[kOutLen];
char* combined_name = malloc(kOutLen * sizeof(char));
char* out_ptr = WebRtcDataLog_Combine(combined_name, kOutLen, kTableName, 17);
if (!out_ptr) return -1;
if (strcmp(combined_name, "c_wrapper_table_17") != 0) return -2;
return 0;
int return_code = 0;
if (!out_ptr) {
return_code = -1;
}
if (strcmp(combined_name, "c_wrapper_table_17") != 0) {
return_code = -2;
}
free(combined_name);
return return_code;
}
int WebRtcDataLogCHelper_TestAddTable() {