malsyned / pfstest

Professional Firmware Services Unit Test Framework
Other
1 stars 0 forks source link

test-mock doesn't verify proper capturing of __FILE__ and __LINE__ #46

Open malsyned opened 6 years ago

malsyned commented 6 years ago

A number of macros in pfstest-mock.h capture FILE (by way of PFSTEST_NV_FILE) and LINE. No self-test exists to make sure that these are captured and passed to pfstest_fail() correctly, which can happen (and the same bug did happen once in assert-that.h). A test exists in test-assert-that.c named should_print_explanation_on_failed_assertion, but I'm not wild about how this bakes in a lot of checks of the standard_reporter's output format. It'd be nicer to have the message_spy save these off somewhere for later comparison.