mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-08-11 05:37:53 +00:00
Add test for function pointers in parameterized tests
This commit is contained in:
Vendored
+11
@@ -167,6 +167,17 @@ void paratest_ShouldHandleParameterizedTestsThatFail(int Num)
|
||||
TEST_ASSERT_EQUAL_MESSAGE(3, Num, "This call should fail");
|
||||
}
|
||||
|
||||
int isArgumentOne(int i)
|
||||
{
|
||||
return i == 1;
|
||||
}
|
||||
|
||||
TEST_CASE(isArgumentOne)
|
||||
void paratest_WorksWithFunctionPointers(int function(int))
|
||||
{
|
||||
TEST_ASSERT_TRUE_MESSAGE(function(1), "Function should return True");
|
||||
}
|
||||
|
||||
#ifdef USE_CEXCEPTION
|
||||
void extest_ShouldHandleCExceptionInTest(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user