diff --git a/src/systemcmds/param/param.c b/src/systemcmds/param/param.c index e270ed9605..3cc9f36241 100644 --- a/src/systemcmds/param/param.c +++ b/src/systemcmds/param/param.c @@ -351,7 +351,7 @@ do_find(const char *name) return 1; } - printf("Found param %s at index %"PRIxPTR"\n", name, ret); + printf("Found param %s at index %" PRIxPTR "\n", name, ret); return 0; } diff --git a/unittests/param_test.cpp b/unittests/param_test.cpp index 23e72c1a76..754d7fdb24 100644 --- a/unittests/param_test.cpp +++ b/unittests/param_test.cpp @@ -39,10 +39,10 @@ void _add_parameters() }; rc2_x.val.i = 16; - param_array[0] = test_1; - param_array[1] = test_2; - param_array[2] = rc_x; - param_array[3] = rc2_x; + param_array[0] = rc_x; + param_array[1] = rc2_x; + param_array[2] = test_1; + param_array[3] = test_2; param_info_base = (struct param_info_s *) ¶m_array[0]; // needs to point at the end of the data, // therefore number of params + 1 @@ -91,10 +91,10 @@ TEST(ParamTest, ResetAll) param_reset_all(); - _assert_parameter_int_value((param_t)0, 2); - _assert_parameter_int_value((param_t)1, 4); - _assert_parameter_int_value((param_t)2, 8); - _assert_parameter_int_value((param_t)3, 16); + _assert_parameter_int_value((param_t)0, 8); + _assert_parameter_int_value((param_t)1, 16); + _assert_parameter_int_value((param_t)2, 2); + _assert_parameter_int_value((param_t)3, 4); } TEST(ParamTest, ResetAllExcludesOne) @@ -105,10 +105,10 @@ TEST(ParamTest, ResetAllExcludesOne) const char *excludes[] = {"RC_X"}; param_reset_excludes(excludes, 1); - _assert_parameter_int_value((param_t)0, 2); - _assert_parameter_int_value((param_t)1, 4); - _assert_parameter_int_value((param_t)2, 50); - _assert_parameter_int_value((param_t)3, 16); + _assert_parameter_int_value((param_t)0, 50); + _assert_parameter_int_value((param_t)1, 16); + _assert_parameter_int_value((param_t)2, 2); + _assert_parameter_int_value((param_t)3, 4); } TEST(ParamTest, ResetAllExcludesTwo) @@ -120,9 +120,9 @@ TEST(ParamTest, ResetAllExcludesTwo) param_reset_excludes(excludes, 2); _assert_parameter_int_value((param_t)0, 50); - _assert_parameter_int_value((param_t)1, 4); + _assert_parameter_int_value((param_t)1, 16); _assert_parameter_int_value((param_t)2, 50); - _assert_parameter_int_value((param_t)3, 16); + _assert_parameter_int_value((param_t)3, 4); } TEST(ParamTest, ResetAllExcludesBoundaryCheck) @@ -133,10 +133,10 @@ TEST(ParamTest, ResetAllExcludesBoundaryCheck) const char *excludes[] = {"RC_X", "TEST_1"}; param_reset_excludes(excludes, 1); - _assert_parameter_int_value((param_t)0, 2); - _assert_parameter_int_value((param_t)1, 4); - _assert_parameter_int_value((param_t)2, 50); - _assert_parameter_int_value((param_t)3, 16); + _assert_parameter_int_value((param_t)0, 50); + _assert_parameter_int_value((param_t)1, 16); + _assert_parameter_int_value((param_t)2, 2); + _assert_parameter_int_value((param_t)3, 4); } TEST(ParamTest, ResetAllExcludesWildcard) @@ -147,8 +147,8 @@ TEST(ParamTest, ResetAllExcludesWildcard) const char *excludes[] = {"RC*"}; param_reset_excludes(excludes, 1); - _assert_parameter_int_value((param_t)0, 2); - _assert_parameter_int_value((param_t)1, 4); - _assert_parameter_int_value((param_t)2, 50); - _assert_parameter_int_value((param_t)3, 50); + _assert_parameter_int_value((param_t)0, 50); + _assert_parameter_int_value((param_t)1, 50); + _assert_parameter_int_value((param_t)2, 2); + _assert_parameter_int_value((param_t)3, 4); }