You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Cmock option for mocking inline functions. The option for mocking externs in not set (default). Not sure what is triggering the inline treatment. Plus, even if there was an inline function here, I did not expect the macros and the included file to be removed in the replacement. I am also surprised that the parser does not generate header guards.
I have included the original file and generated replacement. The included file for macro magic and the macros should be irrelevant to the parser.
Are you using cmock with ceedling? If so, there is a known issue with the test preprocessor (see #328).
But I don't know why the inline mocking is enabled, it is disabled by default.
I am using Cmock option for mocking inline functions. The option for mocking externs in not set (default). Not sure what is triggering the inline treatment. Plus, even if there was an inline function here, I did not expect the macros and the included file to be removed in the replacement. I am also surprised that the parser does not generate header guards.
I have included the original file and generated replacement. The included file for macro magic and the macros should be irrelevant to the parser.
Original:
/*
*/
#ifndef control_h
#define control_h 1
#include "vartypes.h"
#include "global_defines.h"
#undef VAR
#undef STRUCT
#define VAR( type, name, init, fname ) type name ;
#define STRUCT( type, ref ) struct _##type *ref ;
//!Typedef for structure that contains all variables in the control structure
typedef struct _control_t {
#include "controlvars.h"
} control_t;
#undef VAR
#undef STRUCT
extern control_t control_def;
int
control_update( void );
void
control_init( void );
void
control_halt( void );
#endif
Replacement generated by Cmock:
#include "../CM7/controlvars.h"
#include "../CM7/global_defines.h"
#include "../CM7/base/vartypes.h"
typedef struct _control_t {
} control_t;
extern control_t control_def;
int
control_update( void );
void
control_init( void );
void
control_halt( void );
The text was updated successfully, but these errors were encountered: