/** * See https://github.com/KronicDeth/intellij-elixir/issues/438 */ public void testIssue438() { myFixture.configureByFiles("missing_type_operator.ex"); myFixture.checkHighlighting(false, false, true); }
public void testAliasedModuleQualifier() { myFixture.configureByFiles("aliased_module_qualifier.ex", "referenced.ex"); assertReferenceAndResolvedNameArityRange("changeset", 1); }
public void testMapAccessQualifier() { myFixture.configureByFiles("map_access_qualifier.ex", "referenced.ex"); assertUnresolvableReferenceNameArityRange("__struct__", 1); }
public void testNoParenthesesWithMatchedDotMatchedCallOperationInMiddle() { myFixture.configureByFiles("NoParenthesesWithMatchedDotMatchedCallOperationInMiddle.ex"); myFixture.enableInspections(KeywordsNotAtEnd.class); myFixture.checkHighlighting(); }
public void testParenthesesWithMatchedCallOperationInMiddle() { myFixture.configureByFiles("ParenthesesWithMatchedCallOperationInMiddle.ex"); myFixture.enableInspections(KeywordsNotAtEnd.class); myFixture.checkHighlighting(); }
public void testParenthesesWithMatchedWhenNoParenthesesKeywordsOperationInMiddle() { myFixture.configureByFiles("ParenthesesWithMatchedWhenNoParenthesesKeywordsOperationInMiddle.ex"); myFixture.enableInspections(KeywordsNotAtEnd.class); myFixture.checkHighlighting(); }
public void testSingleNestedKeywordValue() { myFixture.configureByFiles("SingleNestedKeywordValue.ex"); myFixture.enableInspections(NoParenthesesManyStrict.class); myFixture.checkHighlighting(); }
public void testMatchedDotMatchedCallOperationKeywordValue() { myFixture.configureByFiles("MatchedDotMatchedCallOperationKeywordValue.ex"); myFixture.enableInspections(NoParenthesesManyStrict.class); myFixture.checkHighlighting(); }
public void testFunctionSpaceEmptyParentheses() { myFixture.configureByFiles("FunctionSpaceEmptyParentheses.ex"); myFixture.enableInspections(NoParenthesesStrict.class); myFixture.checkHighlighting(); }
public void testFunctionSpaceKeywordsInParentheses() { myFixture.configureByFiles("FunctionSpaceKeywordsInParentheses.ex"); myFixture.enableInspections(NoParenthesesStrict.class); myFixture.checkHighlighting(); }
public void testMatchOperator() { myFixture.configureByFiles("match_operator.ex"); myFixture.enableInspections(MatchOperatorInsteadOfTypeOperator.class); myFixture.checkHighlighting(); }
public void testMatchedCallOperationAtEnd() { myFixture.configureByFiles("MatchedCallOperationAtEnd.ex"); myFixture.enableInspections(NoParenthesesManyStrict.class); myFixture.checkHighlighting(); }
public void testMatchedDotMatchedCallOperationAtEnd() { myFixture.configureByFiles("MatchedDotMatchedCallOperationAtEnd.ex"); myFixture.enableInspections(NoParenthesesManyStrict.class); myFixture.checkHighlighting(); }
public void testNoParenthesesWithMatchedWhenNoParenthesesKeywordsOperationInMiddle() { myFixture.configureByFiles("NoParenthesesWithMatchedWhenNoParenthesesKeywordsOperationInMiddle.ex"); myFixture.enableInspections(KeywordsNotAtEnd.class); myFixture.checkHighlighting(); }
public void testParenthesesWithMatchedDotMatchedCallOperationInMiddle() { myFixture.configureByFiles("ParenthesesWithMatchedDotMatchedCallOperationInMiddle.ex"); myFixture.enableInspections(KeywordsNotAtEnd.class); myFixture.checkHighlighting(); }
public void testFunctionSpacePositinalsAndKeywordsInParentheses() { myFixture.configureByFiles("FunctionSpacePositionalsAndKeywordsInParentheses.ex"); myFixture.enableInspections(NoParenthesesStrict.class); myFixture.checkHighlighting(); }
public void testIsVariable() { myFixture.configureByFiles("is_variable.ex"); PsiElement callable = myFixture .getFile() .findElementAt(myFixture.getCaretOffset()) .getPrevSibling(); assertInstanceOf(callable, Call.class); assertFalse("order_by is incorrectly marked as a variable", isVariable(callable)); }
public void testIsParameter() { myFixture.configureByFiles("planet.ex"); PsiElement parameter = myFixture .getFile() .findElementAt(myFixture.getCaretOffset()) .getPrevSibling(); assertInstanceOf(parameter, UnqualifiedNoArgumentsCall.class); assertTrue("planet is not marked as a parameter", isParameter(parameter)); }
public void testIsVariable() { myFixture.configureByFiles("is_variable.ex"); @SuppressWarnings("ConstantConditions") PsiElement callable = myFixture .getFile() .findElementAt(myFixture.getCaretOffset()) .getParent() .getParent(); assertInstanceOf(callable, Call.class); assertFalse("parameter in tuple after Alias dot is incorrectly marked as a variable", isVariable(callable)); }
public void testIsParameter() { myFixture.configureByFiles("is_parameter.ex"); PsiElement variable = myFixture .getFile() .findElementAt(myFixture.getCaretOffset()) .getPrevSibling() .getLastChild() .getLastChild(); assertInstanceOf(variable, UnqualifiedNoArgumentsCall.class); assertFalse("alias is marked as a parameter", isParameter(variable)); assertFalse("alias is marked as a variable", isVariable(variable)); }