aboutsummaryrefslogtreecommitdiffstats
path: root/test_pressure.c
blob: e805858ddf701a752ff884ec152198c6f1fc631a (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
56
57
58
59
60
61
62
63
64
65
#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_inch_mercury(void) {
	test(inch_mercury(123.456), 418070.040384);
}

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);
}

void
test_as_inch_mercury(void) {
	test(as_inch_mercury(inch_mercury(123.456)), 123.456);
}