aboutsummaryrefslogtreecommitdiff
path: root/tests/limits_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-10-18 13:27:01 -0700
committerElliott Hughes <enh@google.com>2017-10-18 13:27:01 -0700
commit19d768598205d915a856ec8f8bf6f996dc6fa83a (patch)
tree8463238af2bc21651e86e9e44973e9b3ba99eb52 /tests/limits_test.cpp
parent435e6384de8f9e35b8878b1ccda5bb5686c15207 (diff)
downloadbionic-19d768598205d915a856ec8f8bf6f996dc6fa83a.tar.gz
More <limits.h> fixes.
Went through the POSIX spec for the _POSIX* and _XOPEN* constants. Bug: http://b/32776472 Test: ran tests Change-Id: I389100dbc7de354eae9056e44b0a7fa8c37374e3
Diffstat (limited to 'tests/limits_test.cpp')
-rw-r--r--tests/limits_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/limits_test.cpp b/tests/limits_test.cpp
index 1d48ffe46..ed42dbbcc 100644
--- a/tests/limits_test.cpp
+++ b/tests/limits_test.cpp
@@ -19,9 +19,9 @@
#include <limits.h>
TEST(limits, macros) {
-#if CHAR_BIT != 8
-#error Insane CHAR_BIT
-#endif
+ ASSERT_EQ(8, CHAR_BIT);
+ ASSERT_EQ(static_cast<int>(sizeof(int)), WORD_BIT);
+ ASSERT_EQ(20, NZERO);
#if !defined(MB_LEN_MAX)
#error MB_LEN_MAX
#endif