- Centralized error strings to a few constants.

- Made use of the new UNITY_SET_DETAILS feature to background set up function & argument details for messages
- CMock now takes up a lot less memory! woo!
This commit is contained in:
Mark VanderVoord
2015-12-10 16:58:10 -05:00
parent ada6dd2d22
commit 647876644b
24 changed files with 456 additions and 94 deletions
+9
View File
@@ -9,6 +9,15 @@
//public constants to be used by mocks
const char* CMockStringOutOfMemory = "CMock has run out of memory. Please allocate more.";
const char* CMockStringCalledMore = "Called more times than expected.";
const char* CMockStringCalledLess = "Called less times than expected.";
const char* CMockStringCalledEarly = "Called earlier than expected.";
const char* CMockStringCalledLate = "Called later than expected.";
const char* CMockStringCallOrder = "Called out of order.";
const char* CMockStringIgnPreExp = "IgnoreArg called before Expect.";
const char* CMockStringPtrPreExp = "ReturnThruPtr called before Expect.";
const char* CMockStringExpNULL = "Expected NULL.";
const char* CMockStringMismatch = "Function called with unexpected argument value.";
//private variables
#ifdef CMOCK_MEM_DYNAMIC
+10 -1
View File
@@ -8,7 +8,16 @@
#define CMOCK_FRAMEWORK_INTERNALS_H
//These are constants that the generated mocks have access to
const char* CMockStringOutOfMemory;
extern const char* CMockStringOutOfMemory;
extern const char* CMockStringCalledMore;
extern const char* CMockStringCalledLess;
extern const char* CMockStringCalledEarly;
extern const char* CMockStringCalledLate;
extern const char* CMockStringCallOrder;
extern const char* CMockStringIgnPreExp;
extern const char* CMockStringPtrPreExp;
extern const char* CMockStringExpNULL;
extern const char* CMockStringMismatch;
//define CMOCK_MEM_DYNAMIC to grab memory as needed with malloc
//when you do that, CMOCK_MEM_SIZE is used for incremental size instead of total