blob: e7a6e179912e26f0e7559b7f9c10af03123a18dd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include <assert.h>
#include <stdio.h>
#include "test.h"
#include "unit.h"
void
test_kelvin(void) {
test(kelvin(123.456), 123.456);
}
void
test_celsius(void) {
test(celsius(123.456), 396.606);
}
void
test_fahrenheit(void) {
test(fahrenheit(123.456), 323.9588889);
}
void
test_rankine(void) {
test(rankine(123.456), 68.5866667);
}
void
test_as_kelvin(void) {
test(as_kelvin(kelvin(123.456)), 123.456);
}
void
test_as_celsius(void) {
test(as_celsius(celsius(123.456)), 123.456);
}
void
test_as_fahrenheit(void) {
test(as_fahrenheit(fahrenheit(123.456)), 123.456);
}
void
test_as_rankine(void) {
test(as_rankine(rankine(123.456)), 123.456);
}
|