Skip to content

Commit 1d86b31

Browse files
committed
test: work around size_t oddities in clang
This is a test for a multi-line function declaration and we don't want to be fighting here against the odd behaviour with `size_t`.
1 parent 8d154e9 commit 1d86b31

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/parser_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def test_single_multiline_function
7070
*/
7171
int some_function(
7272
char *string,
73-
size_t len);
73+
int len);
7474
EOF
7575

7676
actual = parse(name, contents)
@@ -80,26 +80,26 @@ def test_single_multiline_function
8080
:tdef => nil,
8181
:type => :function,
8282
:name => 'some_function',
83-
:body => "int some_function(char *string, size_t len);",
83+
:body => "int some_function(char *string, int len);",
8484
:description => ' Do something',
8585
:comments => " More explanation of what we do\n\n ",
86-
:sig => 'char *::size_t',
86+
:sig => 'char *::int',
8787
:args => [{
8888
:name => 'string',
8989
:type => 'char *',
9090
:comment => 'a sequence of characters'
9191
},
9292
{
9393
:name => 'len',
94-
:type => 'size_t',
94+
:type => 'int',
9595
:comment => nil
9696
}],
9797
:return => {
9898
:type => 'int',
9999
:comment => ' an integer value'
100100
},
101-
:decl => "int some_function(char *string, size_t len)",
102-
:argline => "char *string, size_t len",
101+
:decl => "int some_function(char *string, int len)",
102+
:argline => "char *string, int len",
103103
}]
104104

105105
assert_equal expected, actual

0 commit comments

Comments
 (0)