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

create GeneratedJavadocTokenTypesTest.java #5186

Closed
romani opened this Issue Oct 9, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@romani
Member

romani commented Oct 9, 2017

it is a subtask of #5139.

All is required is to create UT GeneratedJavadocTokenTypesTest that works the same way as https://github.com/checkstyle/checkstyle/blob/master/src/test/java/com/puppycrawl/tools/checkstyle/grammars/GeneratedJavaTokenTypesTest.java but for javadoc tokens - https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java

values of JavadocTokenTypes should never change.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 9, 2017

Member

@Naman-sopho , can you help us with this issue

Member

romani commented Oct 9, 2017

@Naman-sopho , can you help us with this issue

@Naman-sopho

This comment has been minimized.

Show comment
Hide comment
@Naman-sopho

Naman-sopho commented Oct 11, 2017

I am on it @romani

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 16, 2017

Issue checkstyle#5186: Added 'GeneratedJavadocTokenTypesTest' to chec…
…k that the numbers generated by ANTLR for elements in javadoc grammar do not change with the grammar

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 18, 2017

Issue checkstyle#5186: Added 'GeneratedJavadocTokenTypesTest' to chec…
…k that the numbers generated by ANTLR for elements in javadoc grammar do not change with the grammar

romani added a commit that referenced this issue Oct 18, 2017

Issue #5186: Added 'GeneratedJavadocTokenTypesTest' to check that the…
… numbers generated by ANTLR for elements in javadoc grammar do not change with the grammar
@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 18, 2017

Member

@ps-sp , thanks a lot for partial initial fix, I merged it to make sure we will not make more damage.

But we need a bit more changes.

Our contract/API with users is values of https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java
no matter that we are doing/refactoring in grammar, this numbers should not change.

in your UT you check value for assertEquals(MSG, 26, JavadocParser.Char1); .... is absent at https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java so its value could change, nobody care.
I am ok to keep testing for it..... but please add one more UT method that test all values of JavadocTokenTypes (not a JavadocParser). If any new value appear at JavadocTokenTypes , test should catch it too.

@Vladlis , fyi.

Member

romani commented Oct 18, 2017

@ps-sp , thanks a lot for partial initial fix, I merged it to make sure we will not make more damage.

But we need a bit more changes.

Our contract/API with users is values of https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java
no matter that we are doing/refactoring in grammar, this numbers should not change.

in your UT you check value for assertEquals(MSG, 26, JavadocParser.Char1); .... is absent at https://github.com/checkstyle/checkstyle/blob/master/src/main/java/com/puppycrawl/tools/checkstyle/api/JavadocTokenTypes.java so its value could change, nobody care.
I am ok to keep testing for it..... but please add one more UT method that test all values of JavadocTokenTypes (not a JavadocParser). If any new value appear at JavadocTokenTypes , test should catch it too.

@Vladlis , fyi.

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 18, 2017

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 18, 2017

@romani romani added this to the 8.4 milestone Oct 20, 2017

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 20, 2017

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 20, 2017

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 20, 2017

ps-sp added a commit to ps-sp/checkstyle that referenced this issue Oct 20, 2017

romani added a commit that referenced this issue Oct 20, 2017

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Oct 20, 2017

Member

fix is merged

Member

romani commented Oct 20, 2017

fix is merged

@romani romani closed this Oct 20, 2017

timurt added a commit to timurt/checkstyle that referenced this issue Dec 19, 2017

Issue checkstyle#5186: Added 'GeneratedJavadocTokenTypesTest' to chec…
…k that the numbers generated by ANTLR for elements in javadoc grammar do not change with the grammar

timurt added a commit to timurt/checkstyle that referenced this issue Dec 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment