Follow-up for r277458: Update the tsan_mman_test.cc unit test.

llvm-svn: 277463
This commit is contained in:
Kuba Brecka 2016-08-02 14:41:03 +00:00
parent 3a748d6067
commit a56c2ad594
1 changed files with 4 additions and 4 deletions

View File

@ -53,9 +53,9 @@ TEST(Mman, UserRealloc) {
uptr pc = 0;
{
void *p = user_realloc(thr, pc, 0, 0);
// Strictly saying this is incorrect, realloc(NULL, N) is equivalent to
// malloc(N), thus must return non-NULL pointer.
EXPECT_EQ(p, (void*)0);
// Realloc(NULL, N) is equivalent to malloc(N), thus must return
// non-NULL pointer.
EXPECT_NE(p, (void*)0);
}
{
void *p = user_realloc(thr, pc, 0, 100);
@ -68,7 +68,7 @@ TEST(Mman, UserRealloc) {
EXPECT_NE(p, (void*)0);
memset(p, 0xde, 100);
void *p2 = user_realloc(thr, pc, p, 0);
EXPECT_EQ(p2, (void*)0);
EXPECT_NE(p2, (void*)0);
}
{
void *p = user_realloc(thr, pc, 0, 100);