forked from 3rd-party/fff
Migrate build to CMake and standard github workflows
Replace makefiles with CMakeLists.txt. This will allow for IDE and platform agnostic builds of FFF. Update the CI for FFF to use github workflows which don't depend on MS VC. The workflow added will verify the pull requests sent to master buy running 'buildandtest' which mirrors the developer workflow. Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
24
examples/weak_linking/test/src/display.test.c
Normal file
24
examples/weak_linking/test/src/display.test.c
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "test_common.h"
|
||||
#include "display.h"
|
||||
|
||||
DEFINE_FFF_GLOBALS;
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
init_tests(); // Resets common and hook errors to asserts.
|
||||
|
||||
GLOBAL_TEST_bus_read_ret[2] = 0x10;
|
||||
assert( display_init() == true );
|
||||
assert( bus_read_write_fake.call_count == 1);
|
||||
|
||||
display_update( "TEST INFO" );
|
||||
assert( bus_read_write_fake.call_count == 1 );
|
||||
assert( bus_write_fake.call_count == 1 );
|
||||
|
||||
GLOBAL_TEST_bus_read_ret[2] = 0x00;
|
||||
assert( display_init() == false );
|
||||
|
||||
printf("Test " __FILE__ " ok\n");
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user