Skip to content

Commit 75c3f3c

Browse files
committed
minor tweaks
1 parent 2671ad7 commit 75c3f3c

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

lib/cmock_header_parser.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def parse_declaration(parse_project, declaration, namespace = [], classname = ni
578578
# remove default argument statements from mock definitions
579579
args.gsub!(/=\s*[a-zA-Z0-9_.]+\s*/, ' ')
580580

581-
# check for var args
581+
# check for var args and place in their own collection for handling separately
582582
if args =~ /\.\.\./
583583
decl[:var_arg] = args.match(/[\w\s]*\.\.\./).to_s.strip
584584
args = if args =~ /,[\w\s]*\.\.\./
@@ -589,6 +589,8 @@ def parse_declaration(parse_project, declaration, namespace = [], classname = ni
589589
else
590590
decl[:var_arg] = nil
591591
end
592+
593+
# parse out and clean up the remainder of the arguments
592594
args = clean_args(args, parse_project)
593595
decl[:args_string] = args
594596
decl[:args] = parse_args(args)

src/cmock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#define CMOCK_VERSION_MAJOR 2
2020
#define CMOCK_VERSION_MINOR 6
21-
#define CMOCK_VERSION_BUILD 0
21+
#define CMOCK_VERSION_BUILD 1
2222
#define CMOCK_VERSION ((CMOCK_VERSION_MAJOR << 16) | (CMOCK_VERSION_MINOR << 8) | CMOCK_VERSION_BUILD)
2323

2424
/* should be big enough to index full range of CMOCK_MEM_MAX */

test/system/test_compilation/parsing.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ typedef struct
8484
int (*another_function_pointer_in_a_struct) (void);
8585
} another_thing_that_should_get_ignored;
8686

87+
typedef enum
88+
{
89+
A_ENUM_VALUE = -18, /**< Comment */
90+
ANOTHER_ENUM_VALUE = -19 /**< Another comment.
91+
This one goes on and on. */
92+
} SET_OF_ENUM_VALUES_T;
93+
94+
void DoesStuffWithEnum(SET_OF_ENUM_VALUES_T enumVal);
95+
8796
inline int stuff(int num)
8897
{
8998
int reg = 0x12;

0 commit comments

Comments
 (0)