mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-26 18:01:35 +01:00
Merge pull request #550 from jannisbaudisch/fix_test_parameterization_regex
Improve regex for test parameterization to support function pointers
This commit is contained in:
11
test/testdata/testRunnerGenerator.c
vendored
11
test/testdata/testRunnerGenerator.c
vendored
@@ -164,6 +164,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