Attention is currently required from: Sam McNally, Anastasia Klimchuk.
4 comments:
File tests/io_mock.h:
/* An alternative to custom open mock. A test can either register its
* own mock open function or fallback_open_state. */
The text of the comment is alright, but formatting needs to be adjusted. […]
Done
Patch Set #9, Line 120: struct io_mock_fallback_open_state *fallback_open_state;
Just to double-check, did you choose longer names deliberately? I was suggesting […]
I think longer name is fine. If you want to have the "fallback" qualifier I think it should be in addition.
For a shorter name I would rather much more have the "io_mock" prefix (as it was before) than the "fallback" prefix for the struct name. The "io_mock" prefix points to the file where the struct lives and where it is used. The fallback quality can be learned from reading the comments around the use of the struct.
Regarding to the struct member again prefer open_state over fallback_open. fallback_open points to a function name while state makes clear that is the state maintained by the default mock function. If you want the fallback qualifier then I rather fallback_open_state.
File tests/io_mock.c:
/* A test can either register its own mock open function or
* fallback_open_state. */
This can be one-line comment. […]
Done
assert_true(io == NULL || io->open == NULL ||
io->fallback_open_state == NULL);
This can be one line, as it was before, please return back :) […]
Done
To view, visit change 63227. To unsubscribe, or for help writing mail filters, visit settings.