Skip to content

Commit 2af425c

Browse files
committed
Fix checkstyle method length warning.
1 parent ef8c29a commit 2af425c

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

org.metaborg.spoofax.shell.core/src/test/java/org/metaborg/spoofax/shell/core/DynSemEvaluationStrategyTest.java

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,17 @@ public static Collection<Object[]> inputAndRuleParameters() {
9494
IStrategoTerm wrongTypeTerm = termFact.makeList();
9595
IStrategoTerm noSortTerm = termFact.makeAppl(termFact.makeConstructor("Thing", 0));
9696

97-
//@formatter:off
98-
return Arrays
99-
.asList(new Object[][] { { "shell/_Expr/1", existingTerm, NO_EXCEPTION },
100-
{ "shell/Add/2", existingTerm, NO_EXCEPTION },
101-
{ "shell/noSuchRule/2", nonExistingRuleForTerm,
102-
"No shell rule found to be applied "
103-
+ "to term \"nonExistingRuleForTerm(0,0)\"." },
104-
{ "shell/wrongArgumentType/0", wrongTypeTerm,
105-
"Expected a StrategoAppl, but a "
106-
+ "StrategoList was found: \"[]\"." },
107-
{ "shell/_Expr/1", noSortTerm,
108-
"No shell rule found to be applied "
109-
+ "to term \"Thing\". No sort found for term." },
110-
{ "shell/Thing/0", noSortTerm, NO_EXCEPTION }});
111-
//@formatter:on
97+
return Arrays.asList(new Object[][] {
98+
{ "shell/_Expr/1", existingTerm, NO_EXCEPTION },
99+
{ "shell/Add/2", existingTerm, NO_EXCEPTION },
100+
{ "shell/noSuchRule/2", nonExistingRuleForTerm, "No shell rule found to be applied "
101+
+ "to term \"nonExistingRuleForTerm(0,0)\"." },
102+
{ "shell/wrongArgumentType/0", wrongTypeTerm, "Expected a StrategoAppl, but a "
103+
+ "StrategoList was found: \"[]\"." },
104+
{ "shell/_Expr/1", noSortTerm, "No shell rule found to be applied "
105+
+ "to term \"Thing\". No sort found for term." },
106+
{ "shell/Thing/0", noSortTerm, NO_EXCEPTION }
107+
});
112108
}
113109

114110
/**
@@ -136,7 +132,7 @@ public void testEnvironmentPropagation() {
136132
/**
137133
* An {@link IInterpreterLoader} that returns a mock interpreter.
138134
*/
139-
final class MockInterpreterLoader implements IInterpreterLoader {
135+
static final class MockInterpreterLoader implements IInterpreterLoader {
140136
private String ruleKey;
141137

142138
private MockInterpreterLoader(String ruleKey) {
@@ -150,7 +146,6 @@ public PolyglotEngine loadInterpreterForLanguage(ILanguageImpl langImpl)
150146
throws InterpreterLoadException {
151147
try {
152148
PolyglotEngine mockInterpreter = mock(PolyglotEngine.class);
153-
when(mockInterpreter.findGlobalSymbol(anyString())).thenReturn(null);
154149

155150
// Mock the init rule.
156151
Value mockInitRuleResult = when(mock(Value.class).as(RuleResult.class))

0 commit comments

Comments
 (0)