0

Given the following production file structure

hardware.h                  // Generic interface to initialize low-level hardware
hw_microcontroller_A.c      // includes hardware.h for microcontroller type A
hw_microcontroller_B.c      // includes hardware.h for microcontroller type B, different from A
test_hw_microcontroller_A.c // Test file for hw_microcontroller_A.c
test_hw_microcontroller_B.c // Test file for hw_microcontroller_B.c

How do I explicitly point within each test_.c to each specific hw_microcontroller_.c file? I understand the contents of the test file must include unity.h and hardware.h, but how is the linking to the specific hw_microcontroller_.c resolved in each test file? Is the only way to do this to include TEST_FILE with the specific hw_microcontroller_.c file in each test_*.c file?

cowboydan
  • 1,062
  • 7
  • 15

0 Answers0