Skip to content

Issue #13809: kill mutation for AbstarctRootNode#13818

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:XpathAttribute
Oct 5, 2023
Merged

Issue #13809: kill mutation for AbstarctRootNode#13818
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:XpathAttribute

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Oct 3, 2023

Issue #13809: kill mutation for AbstarctRootNode

Mutation

<mutation unstable="true">
<sourceFile>AbstractRootNode.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.xpath.AbstractRootNode</mutatedClass>
<mutatedMethod>iterateAxis</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_2</mutator>
<description>RemoveSwitch 2 (case value 2)</description>
<lineContent>switch (axisNumber) {</lineContent>
</mutation>

Attributes are not allowed by design:

public String getAttributeValue(NamespaceUri namespace, String localPart) {
throw throwUnsupportedOperationException();
}

@Kevin222004
Copy link
Copy Markdown
Contributor Author

I am not finding any query in which attribute axis is used as a root just like I created a test for an ancestor-or-self axis
#13771.

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

No attributes on root.
Root is

public static boolean isRootNode(DetailAST ast) {
return ast.getType() == TokenTypes.COMPILATION_UNIT;
}

Copy link
Copy Markdown
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

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

lgtm

@rdiachenko
Copy link
Copy Markdown
Member

rebased

@rdiachenko rdiachenko assigned romani and unassigned rdiachenko Oct 4, 2023
@romani romani requested a review from Vyom-Yadav October 4, 2023 23:36
@romani romani assigned Vyom-Yadav and unassigned romani Oct 4, 2023
@romani
Copy link
Copy Markdown
Member

romani commented Oct 5, 2023

@Kevin222004 , please resolve conflict

@romani romani merged commit bc281c4 into checkstyle:master Oct 5, 2023
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.

4 participants