Skip to content

Commit 49288a2

Browse files
committed
Make test better
1 parent 4fdf68e commit 49288a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/test/integration/src/stdlib/gpu/realloc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ TEST_MAIN(int, char **, char **) {
1616

1717
// realloc to same size returns the same pointer.
1818
void *same = LIBC_NAMESPACE::realloc(alloc, 32);
19-
EXPECT_NE(same, nullptr);
19+
EXPECT_EQ(same, alloc);
2020
EXPECT_EQ(reinterpret_cast<int *>(same)[0], 42);
2121

2222
// realloc to smaller size returns same pointer.
2323
void *smaller = LIBC_NAMESPACE::realloc(same, 16);
24-
EXPECT_NE(smaller, nullptr);
24+
EXPECT_EQ(smaller, alloc);
2525
EXPECT_EQ(reinterpret_cast<int *>(smaller)[0], 42);
2626

2727
// realloc to larger size returns new pointer and preserves contents.

0 commit comments

Comments
 (0)