diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 15:03:42 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-02-28 15:03:42 -0500 |
| commit | 24f0677b76ba5be7114031f2d6d6746dcb64ce55 (patch) | |
| tree | 8db568429667f9b6637916267a8ee484e87020a1 /test.h | |
| parent | 4835ce7a09dc9012539c33b602e581057d945151 (diff) | |
| download | volute-24f0677b76ba5be7114031f2d6d6746dcb64ce55.zip | |
refactor tests
Diffstat (limited to 'test.h')
| -rw-r--r-- | test.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -0,0 +1,25 @@ +#define EPSILON (1e-7) + +#define test(got, want) { \ + if (got < want-EPSILON || got > want+EPSILON) { \ + fprintf(stderr, "got %lf; want %lf\n", got, want); \ + assert(got == want); \ + } \ +} + + +void test_rad_per_sec(void); +void test_deg_per_sec(void); +void test_rpm(void); +void test_as_rad_per_sec(void); +void test_as_deg_per_sec(void); +void test_as_rpm(void); + +void test_cubic_centimetre(void); +void test_litre(void); +void test_cubic_metre(void); +void test_cubic_inch(void); +void test_as_cubic_centimetre(void); +void test_as_litre(void); +void test_as_cubic_metre(void); +void test_as_cubic_inch(void); |