Navigation Menu

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

Enum private initialization method wrongly reported as pseudo tested #73

Open
tmortagne opened this issue Sep 4, 2018 · 2 comments
Open

Comments

@tmortagne
Copy link
Contributor

tmortagne commented Sep 4, 2018

When running pitest/descartes on xwiki-platform-model the method org.xwiki.model.EntityType#setParentTypes()List<EntityType> as pseudo-tested and Tests section contains only one test ( org.xwiki.model.internal.DefaultModelConfigurationTest.testGetDefaultReferenceNameWhenDefinedInConfiguration).

Problem is that if I do what's indicated (remove the body of that method) then I get the following:

[ERROR] Failures: 
[ERROR]   EntityReferenceSetTest.includePartialOnlySpace:225->assertMatchesSpace:83->assertMatches:63->assertMatches:53
[ERROR]   EntityReferenceTest.equalsFromTo:217 expected: <true> but was: <false>
[ERROR]   EntityReferenceTest.equalsTo:199 expected: <true> but was: <false>
[ERROR] Errors: 
[ERROR]   DefaultReferenceDocumentReferenceResolverTest.testResolveWithExplicitDocumentReference:50 » NullPointer
[ERROR]   DefaultReferenceEntityReferenceResolverTest.resolveDocumentReferenceWhenTypeIsSpace:157 NullPointer
[ERROR]   DefaultReferenceEntityReferenceResolverTest.resolveObjectPropertyReferenceWhenTypeIsDocument:247 NullPointer
[ERROR]   DefaultReferenceEntityReferenceResolverTest.resolveObjectReferenceWhenTypeIsDocument:226 NullPointer
[ERROR]   DefaultReferenceEntityReferenceResolverTest.resolveSpaceReferenceWhenTypeIsDocument:169 » InvalidEntityReference
[ERROR]   DefaultStringDocumentReferenceResolverTest.resolveWithExplicitDocumentReference:58 » NullPointer
[ERROR]   DefaultStringEntityReferenceResolverTest.testResolveWikiReference:484 » NullPointer
[ERROR]   ExplicitReferenceDocumentReferenceResolverTest.resolveWithExplicitDocumentReference:60 » NullPointer
[ERROR]   ExplicitReferenceEntityReferenceResolverTest.testResolveWithExplicitDocumentReference:50 » NullPointer
[ERROR]   ExplicitReferenceEntityReferenceResolverTest.testResolveWithExplicitReferenceWithHoles:90 » NullPointer
[ERROR]   ExplicitStringAttachmentReferenceResolverTest.resolveWithExplicitAttachmentReference:61 » NullPointer
[ERROR]   ExplicitStringDocumentReferenceResolverTest.resolveWithExplicitDocumentReference:59 » NullPointer
[ERROR]   ExplicitStringEntityReferenceResolverTest.resolveWithExplicitDocumentReference:60 » NullPointer
[ERROR]   ExplicitStringEntityReferenceResolverTest.resolveWithExplicitReferenceWithHoles:100 » NullPointer

There is nothing special about those tests so pitest probably find them well but maybe the issue is related to the fact that this is an enum (so this method is indeed "covered" only once by the very first test executed).

@oscarlvp
Copy link
Member

oscarlvp commented Sep 4, 2018

Can you share the report file?

@tmortagne
Copy link
Contributor Author

Right, totally forgot sorry.
201809041646.zip

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

No branches or pull requests

2 participants