Include header-Defines

60 views
Skip to first unread message

thorben kamp

unread,
May 31, 2021, 6:13:54 AM5/31/21
to ThrowTheSwitch Forums

Hey,
I try to build tests for multiple projects. For the CAN-communication i have several Header like: Project_X_CAN.h, Project_Y_CAN.

It Works fine if i include several files in my test-file.Like this:
#include  "Project_X_CAN.h"...
But i cannot include all project-specific files like this. For this purpose i try to fix it with a define in can_config.h which is included in the project.
#define CAN_HEADER "Project_X_CAN.h"
and in the test file i try this:
#include CAN_HEADER 

This doesn't work anymore. even if i have the define directly in my file its not working anymore:
This is my failure code
"ERROR: Test executable "test_SM01.out" failed.
> Produced no output to $stdout.
> And exited with status: [0] (count of failed tests).
> This is often a symptom of a bad memory access in source or test code.

rake aborted"

use_test_preprocessor is set to true

Best regards,
Thorben


Reply all
Reply to author
Forward
0 new messages