File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
tests/drivers/gnss/gnss_api/src Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,21 @@ static bool test_set_fix_rate(const struct test_config *config)
64
64
return true;
65
65
}
66
66
67
+ static bool test_get_fix_rate (const struct test_config * config )
68
+ {
69
+ int ret ;
70
+ uint32_t fix_interval ;
71
+
72
+ ret = gnss_get_fix_rate (dev , & fix_interval );
73
+
74
+ if (ret == - ENOSYS ) {
75
+ ztest_test_skip ();
76
+ }
77
+ zassert_ok (ret , "failed to get fix rate" );
78
+ zassert_equal (fix_interval , config -> fix_interval , "fix_rate mismatch" );
79
+ return true;
80
+ }
81
+
67
82
static void test_validate_fix_rate (const struct test_config * config )
68
83
{
69
84
bool valid ;
@@ -83,6 +98,9 @@ ZTEST(gnss_api, test_fix_rate)
83
98
if (!test_set_fix_rate (& configs [i ])) {
84
99
continue ;
85
100
}
101
+ if (!test_get_fix_rate (& configs [i ])) {
102
+ continue ;
103
+ }
86
104
test_validate_fix_rate (& configs [i ]);
87
105
}
88
106
}
You can’t perform that action at this time.
0 commit comments