Skip to content

Commit

Permalink
Fix build error, add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadiusz Wójcik committed Jan 11, 2025
1 parent 098891d commit e21e92f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extern FOUNDATION_LIBC_NORETURN void foundation_libc_assert(char const * asserti
#endif

#if !defined(__cplusplus)
#undef static_assert
#define static_assert FOUNDATION_LIBC_STATIC_ASSERT
#endif

Expand Down
4 changes: 4 additions & 0 deletions test/src/assert-validator.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ void assert_ok(void) {
void assert_bad(void) {
assert(0);
}

void assert_static(void) {
static_assert(sizeof(int) == sizeof(int), "int size check");
}

0 comments on commit e21e92f

Please sign in to comment.