From d96b8c7d12fc61ec609d6138627b9d6d18139a9a Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sat, 28 Oct 2023 00:00:21 +0300 Subject: move to monorepo + Will probably have to make some changes to dir layout to make things make more sense --- core/tests/from_to.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 core/tests/from_to.c (limited to 'core/tests/from_to.c') diff --git a/core/tests/from_to.c b/core/tests/from_to.c new file mode 100644 index 0000000..d6a392d --- /dev/null +++ b/core/tests/from_to.c @@ -0,0 +1,10 @@ +#include + +int main() +{ + /* increment by prime to hopefully somewhat randomly test patterns */ + for (int64_t i = TRI_MIN; i < TRI_MAX; i += 1048009) { + tri_t t = tri_from(i); + assert(tri_to(t) == i); + } +} -- cgit v1.3