I have a legacy C source file which defines an enum.
//source.c
typedef enum
{
ENUM_0,
ENUM_1,
ENUM_2
} my_enum;
How can I use this enum inside my unit test's source code?
I can think of 2 options:
1. Copy paste the typedef into my source code. It can cause the test to break if the typedef changes in the original file.
2. Use #include "source.c" in my unit test's file. It ends up with bad module seperation.
Thanks