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

Issue #13809: kill mutation for AbstarctRootNode #13818

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

Kevin222004
Copy link
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
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
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
Contributor

@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
Contributor

rebased

@romani
Copy link
Member

romani commented Oct 5, 2023

@Kevin222004 , please resolve conflict

@romani romani merged commit bc281c4 into checkstyle:master Oct 5, 2023
103 of 111 checks passed
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

4 participants