aboutsummaryrefslogtreecommitdiff
path: root/core/tests/from_to.c
blob: d6a392d9584e143addd5ac68ebf635a0743a6ed1 (plain) (blame)
1
2
3
4
5
6
7
8
9
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);
	}
}