debug mock, add list current call var if STR_PRINT_CUR_VAR is set for the mock function

This commit is contained in:
2023-10-01 00:22:40 +02:00
parent 0e662a73b9
commit f356445dec
6 changed files with 232 additions and 67 deletions
+8
View File
@@ -196,6 +196,14 @@ TEST(mockf1){
MOCK_FUNC(int, f2_mock,(int a,int b),(a,b))
STR_PRINT_CUR_VAR(f2_mock, (int a,int b),(a,b)){
char *ret=malloc(150);
//char ret[150];
sprintf(ret,"(int)a: %d, (int)b: %d",a,b);
return ret;
}
EXPECT_MOCK_CALL(int, f2_mock, (int a,int b), (a<b), 3){
return a+b;
}