mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-06-05 21:15:20 +00:00
minor tweaks
This commit is contained in:
@@ -578,7 +578,7 @@ class CMockHeaderParser
|
||||
# remove default argument statements from mock definitions
|
||||
args.gsub!(/=\s*[a-zA-Z0-9_.]+\s*/, ' ')
|
||||
|
||||
# check for var args
|
||||
# check for var args and place in their own collection for handling separately
|
||||
if args =~ /\.\.\./
|
||||
decl[:var_arg] = args.match(/[\w\s]*\.\.\./).to_s.strip
|
||||
args = if args =~ /,[\w\s]*\.\.\./
|
||||
@@ -589,6 +589,8 @@ class CMockHeaderParser
|
||||
else
|
||||
decl[:var_arg] = nil
|
||||
end
|
||||
|
||||
# parse out and clean up the remainder of the arguments
|
||||
args = clean_args(args, parse_project)
|
||||
decl[:args_string] = args
|
||||
decl[:args] = parse_args(args)
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
#define CMOCK_VERSION_MAJOR 2
|
||||
#define CMOCK_VERSION_MINOR 6
|
||||
#define CMOCK_VERSION_BUILD 0
|
||||
#define CMOCK_VERSION_BUILD 1
|
||||
#define CMOCK_VERSION ((CMOCK_VERSION_MAJOR << 16) | (CMOCK_VERSION_MINOR << 8) | CMOCK_VERSION_BUILD)
|
||||
|
||||
/* should be big enough to index full range of CMOCK_MEM_MAX */
|
||||
|
||||
@@ -84,6 +84,15 @@ typedef struct
|
||||
int (*another_function_pointer_in_a_struct) (void);
|
||||
} another_thing_that_should_get_ignored;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
A_ENUM_VALUE = -18, /**< Comment */
|
||||
ANOTHER_ENUM_VALUE = -19 /**< Another comment.
|
||||
This one goes on and on. */
|
||||
} SET_OF_ENUM_VALUES_T;
|
||||
|
||||
void DoesStuffWithEnum(SET_OF_ENUM_VALUES_T enumVal);
|
||||
|
||||
inline int stuff(int num)
|
||||
{
|
||||
int reg = 0x12;
|
||||
|
||||
Vendored
+1
-1
Submodule vendor/c_exception updated: be54d7440e...37673b7595
Reference in New Issue
Block a user