2020-06-11 12:20 PM
Hi,
I wanna use Unity test framework so i cloned from github Unity files. And added my STM32CubeIDE project. And write a simple code for test but i failed when i try build project.
Is there anyone know how can i implement unity and use this framework?
I get this errors when i trry build project >> undefined reference to 'UnityBegin' , undefined reference to 'UnityEnd' ...
I added screenshot of my project.
/* USER CODE BEGIN Includes */
#include "../../Unity/src/unity.h"
#include "../../Unity/src/unity_internals.h"
/* USER CODE END Includes */
int main(void)
{
UNITY_BEGIN();
int a = 1;
TEST_ASSERT( a == 1 ); //this one will pass
TEST_ASSERT( a == 2 ); //this one will fail
return UNITY_END();
}
Best Regardsi
2020-06-11 12:21 PM