mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-17 16:49:54 +00:00
- 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:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user