Search in sources :

Example 6 with Encapsulator

use of il.org.spartan.Leonidas.plugin.leonidas.BasicBlocks.Encapsulator in project Main by SpartanRefactoring.

the class izTest method testConforms.

public void testConforms() throws Exception {
    PsiElement _e1 = createTestExpression("1+5"), _e2 = createTestExpression("1 > 5"), _e3 = createTestStatementFromString("return x"), _e4 = createTestStatementFromString("return y");
    Encapsulator e1 = Encapsulator.buildTreeFromPsi(_e1), e2 = Encapsulator.buildTreeFromPsi(_e2), e3 = Encapsulator.buildTreeFromPsi(_e3), e4 = Encapsulator.buildTreeFromPsi(_e4);
    assert iz.conforms(e1, e2).matches();
    assert iz.conforms(e3, e4).matches();
}
Also used : Encapsulator(il.org.spartan.Leonidas.plugin.leonidas.BasicBlocks.Encapsulator)

Aggregations

Encapsulator (il.org.spartan.Leonidas.plugin.leonidas.BasicBlocks.Encapsulator)6 PsiIfStatement (com.intellij.psi.PsiIfStatement)2 Wrapper (il.org.spartan.Leonidas.auxilary_layer.Wrapper)2 HashMap (java.util.HashMap)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 PsiElement (com.intellij.psi.PsiElement)1 Utils (il.org.spartan.Leonidas.auxilary_layer.Utils)1 Leonidas.auxilary_layer.az (il.org.spartan.Leonidas.auxilary_layer.az)1 Leonidas.auxilary_layer.iz (il.org.spartan.Leonidas.auxilary_layer.iz)1 EncapsulatorIterator (il.org.spartan.Leonidas.plugin.leonidas.BasicBlocks.EncapsulatorIterator)1 GenericEncapsulator (il.org.spartan.Leonidas.plugin.leonidas.BasicBlocks.GenericEncapsulator)1 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 java.util (java.util)1 Collectors (java.util.stream.Collectors)1