summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/kit/bigint.h8
-rw-r--r--source/tests/bigint.test.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/source/kit/bigint.h b/source/kit/bigint.h
index 9f9ba16..be831b7 100644
--- a/source/kit/bigint.h
+++ b/source/kit/bigint.h
@@ -14,14 +14,6 @@ extern "C" {
# define KIT_BIGINT_SIZE 64
#endif
-#if __STDC_VERSION__ >= 199901L
-static_assert(sizeof(u8) == 1, "u8 size should be 1 byte");
-static_assert(sizeof(u32) == 4, "u32 size should be 4 bytes");
-static_assert(sizeof(u64) == 8, "u64 size should be 8 bytes");
-static_assert(KIT_BIGINT_SIZE > 0 && (KIT_BIGINT_SIZE % 8) == 0,
- "Invalid big integer size");
-#endif
-
typedef struct {
u32 v[KIT_BIGINT_SIZE / 4];
} kit_bigint_t;
diff --git a/source/tests/bigint.test.c b/source/tests/bigint.test.c
index 94fd9ef..3e55c39 100644
--- a/source/tests/bigint.test.c
+++ b/source/tests/bigint.test.c
@@ -5,6 +5,14 @@
#include "../kit/kit_test.h"
TEST("bigint size check") {
+ REQUIRE_EQ(sizeof(u8), 1);
+ REQUIRE_EQ(sizeof(u16), 2);
+ REQUIRE_EQ(sizeof(u32), 4);
+ REQUIRE_EQ(sizeof(u64), 8);
+ REQUIRE_EQ(sizeof(i8), 1);
+ REQUIRE_EQ(sizeof(i16), 2);
+ REQUIRE_EQ(sizeof(i32), 4);
+ REQUIRE_EQ(sizeof(i64), 8);
REQUIRE_EQ(sizeof(bigint_t), 256);
}