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

Conversation

jimmygoogle
Copy link
Contributor

I added some tests for the Perl Function::Parameters parser

Copy link
Member

@masatake masatake left a comment

Choose a reason for hiding this comment

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

Thank you.

@@ -0,0 +1,3 @@
fun input.c /^int fun(void) $/;" f typeref:typename:int
method input.c /^int method(void) $/;" f typeref:typename:int
Copy link
Member

Choose a reason for hiding this comment

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

A whitespace after (void) is not needed.

@@ -0,0 +1,3 @@
fun input.c /^int fun(void) $/;" f typeref:typename:int
Copy link
Member

Choose a reason for hiding this comment

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

A whitespace after (void) is not needed.

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

A whitespace after (void) is not needed.

@@ -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).

@@ -0,0 +1,3 @@
fun input.py /^def fun():$/;" f
Copy link
Member

Choose a reason for hiding this comment

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

ctags never runs Perl parser ( and FunctionParameter subparser ) for .py files.
So this test case doesn't make sense as a test case for FunctionParameter subparser.
This test case tests the main part of ctags.
Please remove this test case.

@codecov
Copy link

codecov bot commented Feb 15, 2021

Codecov Report

Merging #2868 (d532bd1) into master (073c52a) will increase coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2868      +/-   ##
==========================================
+ Coverage   86.99%   87.09%   +0.09%     
==========================================
  Files         194      194              
  Lines       44133    44380     +247     
==========================================
+ Hits        38395    38654     +259     
+ Misses       5738     5726      -12     
Impacted Files Coverage Δ
parsers/r-r6class.c 81.73% <0.00%> (-6.59%) ⬇️
main/writer-ctags.c 96.51% <0.00%> (-2.24%) ⬇️
parsers/perl-moose.c 98.04% <0.00%> (-0.91%) ⬇️
parsers/perl.c 89.64% <0.00%> (-0.73%) ⬇️
main/options.c 83.95% <0.00%> (+0.02%) ⬆️
main/dependency.c 96.36% <0.00%> (+0.11%) ⬆️
parsers/r-s4class.c 90.90% <0.00%> (+0.18%) ⬆️
parsers/r.c 90.23% <0.00%> (+0.64%) ⬆️
main/field.c 97.47% <0.00%> (+1.18%) ⬆️
dsl/es.c 47.11% <0.00%> (+2.04%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 073c52a...d532bd1. Read the comment docs.

@masatake masatake merged commit 70677d3 into universal-ctags:master Feb 16, 2021
@masatake
Copy link
Member

Thank you!

@jimmygoogle
Copy link
Contributor Author

jimmygoogle commented Feb 16, 2021 via email

@masatake
Copy link
Member

I got a question. c-fp-test.d/input.c is not for testing FunctionParameters as I wrote python-fp-test.d, isn't it?

@jimmygoogle
Copy link
Contributor Author

jimmygoogle commented Feb 16, 2021 via email

@masatake
Copy link
Member

Well I added tests for C and Python to prove the parser didn't try go beyond the Perl files.

I deleted them in #2870 there is no code choosing a parser in the FunctionParameters subparser and Perl parser.
The testing cases for choosing a parser for an input file are at Tmain directory.

@jimmygoogle
Copy link
Contributor Author

jimmygoogle commented Feb 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants