Open zr5dt opened 9 years ago
The expect_check() and expect_in_set() don't work. They fail even when given the correct expected data. Following is a patch that fixes both functions:
diff --git a/src/cmockery.c b/src/cmockery.c index d651e9b..ca6d8b6 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -972,6 +972,7 @@ static void expect_set( assert_true(number_of_values); memcpy(set, values, number_of_values * sizeof(values[0])); check_integer_set->set = set;
_expect_check(#function, #parameter, FILE, LINE, check_function, \
cast_to_largest_integral_type(check_data), NULL, 1)
/* Add an event to check a parameter, using check_expected(), against a set of
Sorry about the messed up message before. I have now provided the patch in a pull-request (#30).
The expect_check() and expect_in_set() don't work. They fail even when given the correct expected data. Following is a patch that fixes both functions:
diff --git a/src/cmockery.c b/src/cmockery.c index d651e9b..ca6d8b6 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -972,6 +972,7 @@ static void expect_set( assert_true(number_of_values); memcpy(set, values, number_of_values * sizeof(values[0])); check_integer_set->set = set;
define expect_check(function, parameter, check_function, check_data) \
_expect_check(#function, #parameter, FILE, LINE, check_function, \
/* Add an event to check a parameter, using check_expected(), against a set of