Attention is currently required from: Aarya, Edward O'Callaghan, Nikolai Artemiev, Simon Buhrow, Thomas Heijligen.
3 comments:
File tests/erase_func_algo.c:
Patch Set #3, Line 238: void **state
I will check cmocka docs how to do it, keep this unresolved for now.
I found something in cmocka docs, around this page https://api.cmocka.org/group__cmocka__exec.html#gaaccacc105038e49462888a3ededa28c5
They way to set this state is to implement setup function, but also it needs to be passed to cmocka_unit_test_X creation function which we have in tests.c. But that means setup needs to be visible in tests.c, which means introducing headers for setup function? Isn't it leaking internal test details to tests' main function?
Another thing is that I wanted to move g_state to its separate file at some point later (probably not in the first version of the test) so that it can grow large. I don't mind adding twice more meaningful test cases to the list, but this better be in the separate file.
With all that, do you think we can keep it as is for now?
Patch Set #3, Line 276: void **state
ditto.
other comment has the question
File tests/erase_func_algo.c:
We can reduce global state by passing the test case as an argument here, i.e. […]
Done
To view, visit change 67535. To unsubscribe, or for help writing mail filters, visit settings.