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

Update all tests to use text blocks #198

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Aug 14, 2022

Edit: PR #603 was spun off from this PR. That change should be merged and finalized first.

Suggested commit message:

Update all tests to use text blocks (#198)

All `CompilationTestHelper` and `BugCheckerRefactoringTestHelper` test
code is now specified using a single text block. These changes were
automated thanks to the new text block support added to the 
`ErrorProneTestHelperSourceFormat` check, now renamed to
`TestHelperSourceFormat`.

Comment on lines 36 to 45
When running the project's tests in IntelliJ IDEA, you might see the following
error:
```
java: exporting a package from system module jdk.compiler is not allowed with --release
```

If this happens, go to _Settings -> Build, Execution, Deployment -> Compiler ->
Java Compiler_ and deselect the option _Use '--release' option for
cross-compilation (Java 9 and later)_. See [IDEA-288052][idea-288052] for
details.
Copy link
Member Author

Choose a reason for hiding this comment

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

The new idea Maven profile "somehow" makes IDEA behave as desired. We'll need to re-test this before merging.

Base automatically changed from sschroevers/drop-javac-dependency to master September 5, 2022 14:11
@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch 7 times, most recently from 7640841 to 5d77f90 Compare September 6, 2022 15:59
@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch 2 times, most recently from 2bc0460 to a1c93b0 Compare September 18, 2022 14:18
@Stephan202
Copy link
Member Author

Rebased and resolved conflicts.

Copy link

  • Surviving mutants in this change: 32
  • Killed mutants in this change: 56
class surviving killed
🧟tech.picnic.errorprone.bugpatterns.ErrorProneTestHelperSourceFormat 30 50
🧟tech.picnic.errorprone.bugpatterns.util.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 force-pushed the sschroevers/require-jdk-17 branch 3 times, most recently from b6ebdd4 to 47cdac1 Compare January 22, 2024 18:44
Base automatically changed from sschroevers/require-jdk-17 to master February 11, 2024 15:57
@Stephan202 Stephan202 added this to the 0.16.0 milestone Feb 11, 2024
@Stephan202
Copy link
Member Author

Rebased and resolved conflicts and other issues. The PR now targets master. Next up would be to get the code in a reviewable state, primarily by extending test coverage. One other key decision to make, is whether to keep support for the "don't use text blocks" mode. During development this has been very helpful, so perhaps we should keep it for now, but over time I expect that this functionality will become disused. (Though I suppose it'll simplify contributing checks upstream.)

NB: I added a commit with a proposal to rename the check. I've updated the suggested commit message accordingly.

Copy link

sonarcloud bot commented Feb 11, 2024

Copy link

  • Surviving mutants in this change: 33
  • Killed mutants in this change: 74
class surviving killed
🧟tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 68
🧟tech.picnic.errorprone.utils.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie modified the milestones: 0.16.0, 0.17.0 Mar 8, 2024
@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch 2 times, most recently from 167f021 to 4519571 Compare March 17, 2024 11:39
Copy link

  • Surviving mutants in this change: 33
  • Killed mutants in this change: 74
class surviving killed
🧟tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 68
🧟tech.picnic.errorprone.utils.SourceCode 2 6

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

All `CompilationTestHelper` and `BugCheckerRefactoringTestHelper` test
code is now specified using a single text block. These changes were
automated thanks to the new text block support added to the
`ErrorProneTestHelperSourceFormat` check.
Copy link

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
🧟tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
🧟tech.picnic.errorprone.utils.SourceCode 7 6
🎉tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link

sonarcloud bot commented Mar 23, 2024

Copy link

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
🧟tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
🧟tech.picnic.errorprone.utils.SourceCode 7 6
🎉tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

1 similar comment
Copy link

  • Surviving mutants in this change: 38
  • Killed mutants in this change: 71
class surviving killed
🧟tech.picnic.errorprone.guidelines.bugpatterns.TestHelperSourceFormat 31 63
🧟tech.picnic.errorprone.utils.SourceCode 7 6
🎉tech.picnic.errorprone.documentation.BugPatternTestExtractor$BugPatternTestCollector 0 2

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants