mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Add even more tests for formatDiveGasString
Signed-off-by: Anton Lundin <glance@ac2.se>
This commit is contained in:
parent
bba0da589b
commit
a681ff3410
2 changed files with 40 additions and 0 deletions
|
@ -150,6 +150,44 @@ void TestformatDiveGasString::test_reverse_trimix_deco() {
|
||||||
QCOMPARE(formatDiveGasString(&dive), "21/35…100%");
|
QCOMPARE(formatDiveGasString(&dive), "21/35…100%");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TestformatDiveGasString::test_trimix_and_nitrox_same_o2() {
|
||||||
|
struct dive dive = {0};
|
||||||
|
cylinder_t *cylinder = get_or_create_cylinder(&dive, 0);
|
||||||
|
|
||||||
|
cylinder->gasmix.o2.permille = 250;
|
||||||
|
cylinder->gasmix.he.permille = 0;
|
||||||
|
cylinder->start.mbar = 230000;
|
||||||
|
cylinder->end.mbar = 100000;
|
||||||
|
|
||||||
|
cylinder = get_or_create_cylinder(&dive, 1);
|
||||||
|
|
||||||
|
cylinder->gasmix.o2.permille = 250;
|
||||||
|
cylinder->gasmix.he.permille = 250;
|
||||||
|
cylinder->start.mbar = 230000;
|
||||||
|
cylinder->end.mbar = 100000;
|
||||||
|
|
||||||
|
QCOMPARE(formatDiveGasString(&dive), "25/25");
|
||||||
|
}
|
||||||
|
|
||||||
|
void TestformatDiveGasString::test_trimix_and_nitrox_lower_o2() {
|
||||||
|
struct dive dive = {0};
|
||||||
|
cylinder_t *cylinder = get_or_create_cylinder(&dive, 0);
|
||||||
|
|
||||||
|
cylinder->gasmix.o2.permille = 220;
|
||||||
|
cylinder->gasmix.he.permille = 0;
|
||||||
|
cylinder->start.mbar = 230000;
|
||||||
|
cylinder->end.mbar = 100000;
|
||||||
|
|
||||||
|
cylinder = get_or_create_cylinder(&dive, 1);
|
||||||
|
|
||||||
|
cylinder->gasmix.o2.permille = 250;
|
||||||
|
cylinder->gasmix.he.permille = 250;
|
||||||
|
cylinder->start.mbar = 230000;
|
||||||
|
cylinder->end.mbar = 100000;
|
||||||
|
|
||||||
|
QCOMPARE(formatDiveGasString(&dive), "25/25");
|
||||||
|
}
|
||||||
|
|
||||||
void TestformatDiveGasString::test_ccr() {
|
void TestformatDiveGasString::test_ccr() {
|
||||||
struct dive dive = {0};
|
struct dive dive = {0};
|
||||||
cylinder_t *cylinder = get_or_create_cylinder(&dive, 0);
|
cylinder_t *cylinder = get_or_create_cylinder(&dive, 0);
|
||||||
|
|
|
@ -15,5 +15,7 @@ private slots:
|
||||||
void test_trimix();
|
void test_trimix();
|
||||||
void test_trimix_deco();
|
void test_trimix_deco();
|
||||||
void test_reverse_trimix_deco();
|
void test_reverse_trimix_deco();
|
||||||
|
void test_trimix_and_nitrox_same_o2();
|
||||||
|
void test_trimix_and_nitrox_lower_o2();
|
||||||
void test_ccr();
|
void test_ccr();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue