Conversation
19d09dc to
947f918
Compare
|
This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically |
java-checks/src/test/java/org/sonar/java/checks/DeadStoreCheckTest.java
Outdated
Show resolved
Hide resolved
...-checks-test-sources/default/src/main/files/non-compiling/checks/UnusedVariablesFPCheck.java
Show resolved
Hide resolved
...-checks-test-sources/default/src/main/files/non-compiling/checks/UnusedVariablesFPCheck.java
Outdated
Show resolved
Hide resolved
|
|
This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically |
java-checks/src/test/java/org/sonar/java/checks/DeadStoreCheckTest.java
Outdated
Show resolved
Hide resolved
eb0e8ef to
b23c2de
Compare
|
Addressed both issues in d78ed6b |
|
|
This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically |
|
Is this ready for re-review? |
Yes it is |
tomasz-tylenda-sonarsource
left a comment
There was a problem hiding this comment.
Let's use dogfooding on peachee to test this PR. If you haven't used it before, it's a good thing to learn. We can talk about it offline.
| assertThat(unknownSymbol.isTypeSymbol()).isFalse(); | ||
| assertThat(unknownSymbol.isVariableSymbol()).isFalse(); | ||
| assertThat(unknownSymbol.isMethodSymbol()).isFalse(); | ||
| assertThat(unknownSymbol.isMethodSymbol()).isEqualTo(unknownSymbol instanceof Symbols.UnknownMethodSymbol); |
There was a problem hiding this comment.
We should not have logic in tests. Each test that calls assertCommonProperties should have an assertion with a constant, either true or false. After all, if this property changes, it is not a common property.
Reference: https://testing.googleblog.com/2014/07/testing-on-toilet-dont-put-logic-in.html




Uh oh!
There was an error while loading. Please reload this page.