aboutsummaryrefslogtreecommitdiff
path: root/test_data_manager.c
diff options
context:
space:
mode:
authorDavid Phillips <david@yeah.nah.nz>2021-02-14 00:01:13 +1300
committerDavid Phillips <david@yeah.nah.nz>2021-02-14 00:05:23 +1300
commit5d40c94a0fa181d08a4afc5e8e9fd1b4c132ecab (patch)
treea6e61e2edc44e27f2a4dd2662527ad35ae661bce /test_data_manager.c
parent06c7bb3ab139320fcc6c4f1e94b8a58a872c7e14 (diff)
downloadaltimeter-5d40c94a0fa181d08a4afc5e8e9fd1b4c132ecab.tar.xz
Implement barometer reset/init
Diffstat (limited to 'test_data_manager.c')
-rw-r--r--test_data_manager.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test_data_manager.c b/test_data_manager.c
index 4673cab..56a9f9e 100644
--- a/test_data_manager.c
+++ b/test_data_manager.c
@@ -17,3 +17,15 @@ RUNNER_DECLARE_TEST(test_data_manager_first_readings)
data_manager_tick(&ctx);
TEST_ASSERT_FLOAT_WITHIN(0.001, 1019.45, ctx.pressure);
}
+
+RUNNER_DECLARE_TEST(test_data_manager_reinit)
+{
+ struct data_ctx ctx;
+ /* init 1 */
+ data_manager_init(&ctx);
+ TEST_ASSERT_FLOAT_WITHIN(0.001, 1019.5, ctx.pressure);
+
+ /* check re-init */
+ data_manager_init(&ctx);
+ TEST_ASSERT_FLOAT_WITHIN(0.001, 1019.5, ctx.pressure);
+}