c-autotools-template-small/tests/test_executor.c
2022-08-19 19:08:46 -07:00

15 lines
398 B
C

#include "executor.h"
#include "mock_cfgfile.h"
#include "unity.h"
void setUp(void) {}
void tearDown(void) {}
void test_DoMath_WithPositive_Works(void) {
// (Intentionally mock the wrong answer to demonstrate that the mock is
// being called:)
cfgfile_add_one_ExpectAndReturn(7, 1000);
int result = executor_do_math(7);
TEST_ASSERT_EQUAL_MESSAGE(7000, result, "Does math");
}