Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiaanspeck authored Nov 18, 2024
1 parent 4b864c0 commit 575fdbd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class ConditionalExpressionIsFalseTypedCheckTest extends MagikTypedCheckTestBase
})
void testOk(final String code) {
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
final ConditionalExpressionIsFalseTypedCheck check =
new ConditionalExpressionIsFalseTypedCheck();
final MagikTypedCheck check = new ConditionalExpressionIsFalseTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).isEmpty();
}
Expand All @@ -55,8 +54,7 @@ void testOk(final String code) {
})
void testFail(final String code) {
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
final ConditionalExpressionIsFalseTypedCheck check =
new ConditionalExpressionIsFalseTypedCheck();
final MagikTypedCheck check = new ConditionalExpressionIsFalseTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).hasSize(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ void testMethodUnknown() {
object.m()
_endblock""";
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
final MethodArgumentCountMatchesParameterCountTypedCheck check =
new MethodArgumentCountMatchesParameterCountTypedCheck();
final MagikTypedCheck check = new MethodArgumentCountMatchesParameterCountTypedCheck();
final List<MagikIssue> issues = this.runCheck(code, definitionKeeper, check);
assertThat(issues).isEmpty();
}
Expand Down Expand Up @@ -73,8 +72,7 @@ void testArgumentCountMatches() {
_block
object.m(object, object)
_endblock""";
final MethodArgumentCountMatchesParameterCountTypedCheck check =
new MethodArgumentCountMatchesParameterCountTypedCheck();
final MagikTypedCheck check = new MethodArgumentCountMatchesParameterCountTypedCheck();
final List<MagikIssue> issues = this.runCheck(code, definitionKeeper, check);
assertThat(issues).isEmpty();
}
Expand Down Expand Up @@ -121,8 +119,7 @@ void testArgumentMissing() {
_block
object.m(object)
_endblock""";
final MethodArgumentCountMatchesParameterCountTypedCheck check =
new MethodArgumentCountMatchesParameterCountTypedCheck();
final MagikTypedCheck check = new MethodArgumentCountMatchesParameterCountTypedCheck();
final List<MagikIssue> issues = this.runCheck(code, definitionKeeper, check);
assertThat(issues).hasSize(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ void testArgumentTypeMatches(final String code) {
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
this.addTestMethods(definitionKeeper);

final MethodArgumentTypeMatchesParameterTypeTypedCheck check =
new MethodArgumentTypeMatchesParameterTypeTypedCheck();
final MagikTypedCheck check = new MethodArgumentTypeMatchesParameterTypeTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).isEmpty();
}
Expand All @@ -97,8 +96,7 @@ void testArgumentTypeNotMatches(final String code) {
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
this.addTestMethods(definitionKeeper);

final MethodArgumentTypeMatchesParameterTypeTypedCheck check =
new MethodArgumentTypeMatchesParameterTypeTypedCheck();
final MagikTypedCheck check = new MethodArgumentTypeMatchesParameterTypeTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).hasSize(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class SwChar16VectorEvaluateInvocationTypedCheckTest extends MagikTypedCheckTest
void testUseOfSwChar16VectorEvaluate() {
final String code = "'abc'.evaluate()";
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
final SwChar16VectorEvaluateInvocationTypedCheck check =
new SwChar16VectorEvaluateInvocationTypedCheck();
final MagikTypedCheck check = new SwChar16VectorEvaluateInvocationTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).hasSize(1);
}
Expand All @@ -24,8 +23,7 @@ void testUseOfSwChar16VectorEvaluate() {
void testUseOfOtherEvaluate() {
final String code = "100.evaluate()";
final IDefinitionKeeper definitionKeeper = new DefinitionKeeper();
final SwChar16VectorEvaluateInvocationTypedCheck check =
new SwChar16VectorEvaluateInvocationTypedCheck();
final MagikTypedCheck check = new SwChar16VectorEvaluateInvocationTypedCheck();
final List<MagikIssue> checkResults = this.runCheck(code, definitionKeeper, check);
assertThat(checkResults).isEmpty();
}
Expand Down

0 comments on commit 575fdbd

Please sign in to comment.