use of org.intellij.lang.xpath.psi.XPath2SequenceType in project intellij-community by JetBrains.
the class XPath2ExpressionTest method doTest.
protected XPathType doTest(boolean symmetric) throws Throwable {
myFixture.configureByFile(getTestFileName() + ".xpath2");
final XPathExpression expression = getExpression();
// all these cases must be green
myFixture.checkHighlighting();
if (symmetric && expression instanceof XPathBinaryExpression) {
final XPathBinaryExpression expr = (XPathBinaryExpression) expression;
if (expr.getLOperand().getType() != expr.getROperand().getType()) {
myFixture.configureByText(XPathFileType.XPATH2, expr.getROperand().getText() + " " + expr.getOperationSign() + " " + expr.getLOperand().getText());
assertEquals(getExpression().getType(), expression.getType());
myFixture.checkHighlighting();
}
}
final XPathType type = expression.getType();
if (type instanceof XPath2SequenceType) {
return ((XPath2SequenceType) type).getType();
}
return type;
}
Aggregations