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:
parent
8885d22399
commit
84736882ad
@ -31,11 +31,17 @@ int WebRtcDataLogCHelper_TestReturnLog() {
|
|||||||
|
|
||||||
int WebRtcDataLogCHelper_TestCombine() {
|
int WebRtcDataLogCHelper_TestCombine() {
|
||||||
const int kOutLen = strlen(kTableName) + 4; /* Room for "_17" + '\0' */
|
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);
|
char* out_ptr = WebRtcDataLog_Combine(combined_name, kOutLen, kTableName, 17);
|
||||||
if (!out_ptr) return -1;
|
int return_code = 0;
|
||||||
if (strcmp(combined_name, "c_wrapper_table_17") != 0) return -2;
|
if (!out_ptr) {
|
||||||
return 0;
|
return_code = -1;
|
||||||
|
}
|
||||||
|
if (strcmp(combined_name, "c_wrapper_table_17") != 0) {
|
||||||
|
return_code = -2;
|
||||||
|
}
|
||||||
|
free(combined_name);
|
||||||
|
return return_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WebRtcDataLogCHelper_TestAddTable() {
|
int WebRtcDataLogCHelper_TestAddTable() {
|
||||||
|
Loading…
Reference in New Issue
Block a user