mirror of
https://github.com/ThrowTheSwitch/CMock
synced 2025-06-01 03:59:33 -04:00
more type unit tests
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@133 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
parent
d6d1757172
commit
5843b7e518
@ -133,13 +133,14 @@ class CMockFunctionPrototypeParserTest < Test::Unit::TestCase
|
||||
assert_nil(parsed.get_var_arg)
|
||||
|
||||
# make sure custom types containing primitive names don't gum up the parsing works
|
||||
parsed = @parser.parse("void foo_bar(integer param, character thing, longint * junk, constant value)")
|
||||
assert_equal('integer param, character thing, longint* junk, constant value', parsed.get_argument_list)
|
||||
parsed = @parser.parse("void foo_bar(integer param, character thing, longint * junk, constant value, int32_t const number)")
|
||||
assert_equal('integer param, character thing, longint* junk, constant value, int32_t const number', parsed.get_argument_list)
|
||||
assert_equal([
|
||||
{:type => 'integer', :name => 'param'},
|
||||
{:type => 'character', :name => 'thing'},
|
||||
{:type => 'longint*', :name => 'junk'},
|
||||
{:type => 'constant', :name => 'value'}],
|
||||
{:type => 'constant', :name => 'value'},
|
||||
{:type => 'int32_t', :name => 'number'}],
|
||||
parsed.get_arguments)
|
||||
assert_nil(parsed.get_var_arg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user