diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-28 00:00:21 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-28 00:00:21 +0300 |
| commit | d96b8c7d12fc61ec609d6138627b9d6d18139a9a (patch) | |
| tree | 82bc9a4c2b22de6c021097fb79a57b6d7756a127 /core/tests/from_to.c | |
| download | tri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.tar.gz tri-d96b8c7d12fc61ec609d6138627b9d6d18139a9a.zip | |
move to monorepo
+ Will probably have to make some changes to dir layout to make things
make more sense
Diffstat (limited to 'core/tests/from_to.c')
| -rw-r--r-- | core/tests/from_to.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 <tri.h> + +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); + } +} |
