fix param_test

This commit is contained in:
Daniel Agar
2016-04-24 18:18:32 -04:00
committed by Lorenz Meier
parent 008354f935
commit d85e7732b4
4 changed files with 130 additions and 143 deletions
+7 -3
View File
@@ -10,6 +10,8 @@ struct param_info_s param_array[256];
struct param_info_s *param_info_base;
struct param_info_s *param_info_limit;
#define param_info_count 4
/*
* Adds test parameters
*/
@@ -44,8 +46,10 @@ void _add_parameters()
param_array[2] = rc_x;
param_array[3] = rc2_x;
param_info_base = (struct param_info_s *) &param_array[0];
param_info_limit = (struct param_info_s *) &param_array[4]; // needs to point at the end of the data,
// therefore number of params + 1
// needs to point at the end of the data,
// therefore number of params + 1
param_info_limit = (struct param_info_s *) &param_array[4];
}
void _assert_parameter_int_value(param_t param, int32_t expected)
@@ -149,4 +153,4 @@ TEST(ParamTest, ResetAllExcludesWildcard)
_assert_parameter_int_value((param_t)1, 4);
_assert_parameter_int_value((param_t)2, 50);
_assert_parameter_int_value((param_t)3, 50);
}
}