From 74fa13f6a038e52d9fbd721f1f414ae097e6325b Mon Sep 17 00:00:00 2001 From: John Lindgren Date: Wed, 30 Oct 2019 10:14:30 -0400 Subject: [PATCH] CMOCK_MEM_ALIGN should not change depending on #include order. The value of CMOCK_MEM_ALIGN changed depending on whether unity.h or cmock.h was included first. Since cmock_internals.h uses features from unity.h, it should include unity.h. --- src/cmock.c | 1 - src/cmock_internals.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cmock.c b/src/cmock.c index f6a41c8..372702b 100644 --- a/src/cmock.c +++ b/src/cmock.c @@ -4,7 +4,6 @@ [Released under MIT License. Please refer to license.txt for details] ========================================== */ -#include "unity.h" #include "cmock.h" //public constants to be used by mocks diff --git a/src/cmock_internals.h b/src/cmock_internals.h index 5c922ad..ae2e496 100644 --- a/src/cmock_internals.h +++ b/src/cmock_internals.h @@ -7,6 +7,8 @@ #ifndef CMOCK_FRAMEWORK_INTERNALS_H #define CMOCK_FRAMEWORK_INTERNALS_H +#include "unity.h" + //These are constants that the generated mocks have access to extern const char* CMockStringOutOfMemory; extern const char* CMockStringCalledMore;