diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 21:01:26 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 21:01:26 -0500 |
| commit | 942a6711361c371da0736cc62f0e3e2ed13f341b (patch) | |
| tree | 607afae0b1c3446bbdc76da4b59d24ca24f0d753 /test_fraction.c | |
| parent | faf14d71cfbac1f21500f4b997441fa03731bf0e (diff) | |
| download | volute-942a6711361c371da0736cc62f0e3e2ed13f341b.zip | |
fraction/percent conversion functions
Diffstat (limited to 'test_fraction.c')
| -rw-r--r-- | test_fraction.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 <assert.h> +#include <stdio.h> + +#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); +} |