Skip to content

Commit

Permalink
Units: added tests for Function::Parameters parser (#2868)
Browse files Browse the repository at this point in the history
* Added tests for Function::Parameters parser

* Removed Python tests

* Removed whitespace

Co-authored-by: Jim Butler <jim.butler@endurance.com>
  • Loading branch information
jimmygoogle and Jim Butler committed Feb 16, 2021
1 parent 0ccd81f commit 70677d3
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
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)
{
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;

0 comments on commit 70677d3

Please sign in to comment.