Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added tests for Function::Parameters parser #2868

Merged
merged 3 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Units/function-parameters.r/c-fp-test.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fun input.c /^int fun(void)$/;" f typeref:typename:int
method input.c /^int method(void)$/;" f typeref:typename:int
sub input.c /^int sub(void)$/;" f typeref:typename:int
14 changes: 14 additions & 0 deletions Units/function-parameters.r/c-fp-test.d/input.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
int method(void)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...becase there is no whitespace after (void).

{
return 0;
}

int sub(void)
{
return 0;
}

int fun(void)
{
return 0;
}
4 changes: 4 additions & 0 deletions Units/function-parameters.r/perl-fp-test.d/expected.tags
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Jim::Butler input.pl /^package Jim::Butler;$/;" p
my_function input.pl /^fun my_function() {}$/;" f
my_method input.pl /^method my_method() {}$/;" m
my_subroutine input.pl /^sub my_subroutine {}$/;" s
11 changes: 11 additions & 0 deletions Units/function-parameters.r/perl-fp-test.d/input.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package Jim::Butler;

use Function::Parameters;

method my_method() {}

fun my_function() {}

sub my_subroutine {}

1;