Build LinuxLibcSupportTest and make it pass.

Review URL: http://breakpad.appspot.com/341001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@903 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
thestig@chromium.org 2012-01-11 20:35:18 +00:00
parent 577304f02a
commit 03c31f2100
3 changed files with 29 additions and 2 deletions

View file

@ -59,8 +59,12 @@ TEST(LinuxLibcSupportTest, strcmp) {
for (unsigned i = 0; ; ++i) {
if (!test_data[i*2])
break;
ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]),
strcmp(test_data[i*2], test_data[i*2 + 1]));
int libc_result = strcmp(test_data[i*2], test_data[i*2 + 1]);
if (libc_result > 1)
libc_result = 1;
else if (libc_result < -1)
libc_result = -1;
ASSERT_EQ(my_strcmp(test_data[i*2], test_data[i*2 + 1]), libc_result);
}
}