From 942a6711361c371da0736cc62f0e3e2ed13f341b Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Fri, 28 Feb 2025 21:01:26 -0500 Subject: fraction/percent conversion functions --- test_fraction.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test_fraction.c (limited to 'test_fraction.c') diff --git a/test_fraction.c b/test_fraction.c new file mode 100644 index 0000000..726b2fd --- /dev/null +++ b/test_fraction.c @@ -0,0 +1,15 @@ +#include +#include + +#include "test.h" +#include "unit.h" + +void +test_percent(void) { + test(percent(12.345), 0.12345); +} + +void +test_as_percent(void) { + test(as_percent(percent(12.345)), 12.345); +} -- cgit v1.2.3