git: b54dcb897a5f - main - libc/tests: Add assertions for BOOL_WIDTH, BOOL_MAX, and BITINT_MAXWIDTH
Faraz Vahedi <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.cvs.src |
|---|---|
| Message-ID | <6a7d91b9.43a91.17af60b__2193.19025506906$1786614242$gmane$org@gitrepo.freebsd.org> |
The branch main has been updated by kfv: URL: https://cgit.FreeBSD.org/src/commit/?id=b54dcb897a5fa66ff1013d0ea403ed8894e34b8a commit b54dcb897a5fa66ff1013d0ea403ed8894e34b8a Author: Faraz Vahedi <[email protected]> AuthorDate: 2026-08-04 16:31:37 +0000 Commit: Faraz Vahedi <[email protected]> CommitDate: 2026-08-13 09:41:41 +0000 libc/tests: Add assertions for BOOL_WIDTH, BOOL_MAX, and BITINT_MAXWIDTH Reviewed by: fuz Approved by: fuz (mentor) MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/2352 --- lib/libc/tests/gen/limits_test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libc/tests/gen/limits_test.c b/lib/libc/tests/gen/limits_test.c index 7324ef74319e..b6f6fb78fab8 100644 --- a/lib/libc/tests/gen/limits_test.c +++ b/lib/libc/tests/gen/limits_test.c @@ -27,6 +27,9 @@ __XSTRING(TYPE) "_MAX wrongly defined"); /* primitive types */ +static_assert(BOOL_WIDTH == 1, "BOOL_WIDTH wrongly defined"); +static_assert(BOOL_MAX == 1, "BOOL_MAX wrongly defined"); + #ifdef __CHAR_UNSIGNED__ CHECK_UTYPE(char, CHAR); #else @@ -92,6 +95,9 @@ CHECK_UTYPE(uintmax_t, UINTMAX); CHECK_UTYPE(uintptr_t, UINTPTR); CHECK_UTYPE(size_t, SIZE); +static_assert(BITINT_MAXWIDTH >= ULLONG_WIDTH, + "BITINT_MAXWIDTH wrongly defined"); + /* dummy */ ATF_TC_WITHOUT_HEAD(dummy); ATF_TC_BODY(dummy, tc) {}