Skip to content

Commit

Permalink
Fix invalid Java unit test assertion. C3 should not suggest ignored
Browse files Browse the repository at this point in the history
tokens as completions

Signed-off-by: Michael Allman <msa@allman.ms>
  • Loading branch information
mallman committed May 13, 2024
1 parent c0530ed commit 234f1dd
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,13 @@
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;
import org.antlr.v4.runtime.atn.PredictionMode;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;

import static org.junit.Assert.*;

/**
* Unit tests for CodeCompletionCore
*/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class TestCodeCompletionCore {

private static final Logger logger = Logger.getLogger(TestCodeCompletionCore.class.getName());
Expand Down Expand Up @@ -153,8 +150,8 @@ public void test2_typicalExpressionTest() throws Exception {
assertTrue(candidates.tokens.containsKey(ExprLexer.VAR));
assertTrue(candidates.tokens.containsKey(ExprLexer.LET));

assertEquals(Arrays.asList(new Integer[]{ExprLexer.ID, ExprLexer.EQUAL}), candidates.tokens.get(ExprLexer.VAR));
assertEquals(Arrays.asList(new Integer[]{ExprLexer.ID, ExprLexer.EQUAL}), candidates.tokens.get(ExprLexer.LET));
assertEquals(Arrays.asList(new Integer[]{}), candidates.tokens.get(ExprLexer.VAR));
assertEquals(Arrays.asList(new Integer[]{}), candidates.tokens.get(ExprLexer.LET));

// 2) On the variable name ('c').
candidates = core.collectCandidates(2, null);
Expand Down

0 comments on commit 234f1dd

Please sign in to comment.