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.

@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch from c23e387 to 201ea7c Compare August 14, 2022 19:57
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.

@Stephan202 Stephan202 added this to the 0.16.0 milestone Feb 11, 2024
@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch from 42ebd8e to 6221fc9 Compare February 11, 2024 16:50
@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.
@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch from 4519571 to 61120c7 Compare March 23, 2024 20:06
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.

@Stephan202 Stephan202 force-pushed the sschroevers/jdk-17-tests branch from 51cd85c to e735164 Compare March 23, 2024 22:05
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.

@rickie rickie modified the milestones: 0.19.0, 0.20.0 Oct 23, 2024
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.

3 participants