mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-06-05 21:15:22 +00: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:
Vendored
+1
@@ -4,5 +4,6 @@
|
||||
#define EXTERN_DECL
|
||||
|
||||
extern int CounterSuiteSetup;
|
||||
extern int isArgumentOne(int i);
|
||||
|
||||
#endif
|
||||
|
||||
Vendored
+11
@@ -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