blob: f04a1bc7a0deed83bfa49497684c7666db9b3d8f (
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
46
47
48
49
50
51
52
53
54
55
|
#include <assert.h>
#include <stdio.h>
#include "test.h"
#include "unit.h"
void
test_pascal(void) {
test(pascal(123.456), 123.456);
}
void
test_millibar(void) {
test(millibar(123.456), 12345.6);
}
void
test_kilopascal(void) {
test(kilopascal(123.456), 123456.0);
}
void
test_bar(void) {
test(bar(123.456), 12345600.0);
}
void
test_psi(void) {
test(psi(123.456), 851199.15638539323);
}
void
test_as_pascal(void) {
test(as_pascal(pascal(123.456)), 123.456);
}
void
test_as_millibar(void) {
test(as_millibar(millibar(123.456)), 123.456);
}
void
test_as_kilopascal(void) {
test(as_kilopascal(kilopascal(123.456)), 123.456);
}
void
test_as_bar(void) {
test(as_bar(bar(123.456)), 123.456);
}
void
test_as_psi(void) {
test(as_psi(psi(123.456)), 123.456);
}
|