summaryrefslogtreecommitdiff
path: root/tests/malloc_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/malloc_test.cpp')
-rw-r--r--tests/malloc_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/malloc_test.cpp b/tests/malloc_test.cpp
index 8fba1c449..a7b9d52e5 100644
--- a/tests/malloc_test.cpp
+++ b/tests/malloc_test.cpp
@@ -500,3 +500,10 @@ TEST(malloc, verify_alignment) {
delete[] values_64;
delete[] values_ldouble;
}
+
+TEST(malloc, mallopt_smoke) {
+ errno = 0;
+ ASSERT_EQ(0, mallopt(-1000, 1));
+ // mallopt doesn't set errno.
+ ASSERT_EQ(0, errno);
+}