use of claw.tatsu.xcodeml.xnode.common.Xnode in project claw-compiler by C2SM-RCM.
the class XmlHelper method createXpragma.
public static Xnode createXpragma() {
String xml = "<" + Xname.F_PRAGMA_STMT + "></" + Xname.F_PRAGMA_STMT + ">";
Xnode n = XmlHelper.getElementFromString(xml);
assertNotNull(n);
return n;
}
use of claw.tatsu.xcodeml.xnode.common.Xnode in project claw-compiler by C2SM-RCM.
the class XmlHelper method createXdeclTable.
public static XdeclTable createXdeclTable(String xml) {
Xnode n = XmlHelper.getElementFromString(xml);
assertNotNull(n);
return new XdeclTable(n);
}
use of claw.tatsu.xcodeml.xnode.common.Xnode in project claw-compiler by C2SM-RCM.
the class XmlHelper method createXfctTypeFromString.
public static FfunctionType createXfctTypeFromString(String xml) {
Xnode n = XmlHelper.getElementFromString(xml);
assertNotNull(n);
return new FfunctionType(n);
}
use of claw.tatsu.xcodeml.xnode.common.Xnode in project claw-compiler by C2SM-RCM.
the class XmlHelper method createXbasicTypeFromString.
public static FbasicType createXbasicTypeFromString(String xml) {
Xnode n = XmlHelper.getElementFromString(xml);
assertNotNull(n);
return new FbasicType(n);
}
use of claw.tatsu.xcodeml.xnode.common.Xnode in project claw-compiler by C2SM-RCM.
the class ClawRangeTest method compareWithLoopIterationRangeTest.
@Test
public void compareWithLoopIterationRangeTest() {
Xnode iterationRange1 = XmlHelper.createXnode(beginLoop + inductionVar1 + indexRange1 + endLoop);
assertNotNull(iterationRange1);
Xnode iterationRange2 = XmlHelper.createXnode(beginLoop + inductionVar1 + indexRange2 + endLoop);
assertNotNull(iterationRange1);
ClawRange range1 = new ClawRange("i", "1", "10", "1");
assertTrue(range1.compareToDoStmt(iterationRange1));
assertFalse(range1.compareToDoStmt(iterationRange2));
ClawRange range2 = new ClawRange("i", "1", "10", "2");
assertFalse(range2.compareToDoStmt(iterationRange1));
assertFalse(range2.compareToDoStmt(iterationRange2));
ClawRange range3 = new ClawRange("i", "1", "11", "1");
assertFalse(range3.compareToDoStmt(iterationRange1));
assertFalse(range3.compareToDoStmt(iterationRange2));
ClawRange range4 = new ClawRange("i", "2", "10", "1");
assertFalse(range4.compareToDoStmt(iterationRange1));
assertFalse(range4.compareToDoStmt(iterationRange2));
ClawRange range5 = new ClawRange("j", "1", "10", "1");
assertFalse(range5.compareToDoStmt(iterationRange1));
assertFalse(range5.compareToDoStmt(iterationRange2));
ClawRange range6 = new ClawRange("i", "istart", "iend", "1");
assertTrue(range6.compareToDoStmt(iterationRange2));
assertFalse(range6.compareToDoStmt(iterationRange1));
ClawRange range7 = new ClawRange("i", "istart", "iend", "2");
assertFalse(range7.compareToDoStmt(iterationRange2));
assertFalse(range7.compareToDoStmt(iterationRange1));
ClawRange range8 = new ClawRange("i", "istart", "ieend", "1");
assertFalse(range8.compareToDoStmt(iterationRange2));
assertFalse(range8.compareToDoStmt(iterationRange1));
ClawRange range9 = new ClawRange("i", "istarter", "iend", "1");
assertFalse(range9.compareToDoStmt(iterationRange2));
assertFalse(range9.compareToDoStmt(iterationRange1));
ClawRange range10 = new ClawRange("j", "istart", "iend", "1");
assertFalse(range10.compareToDoStmt(iterationRange2));
assertFalse(range10.compareToDoStmt(iterationRange1));
ClawRange range11 = new ClawRange();
range11.setInductionVar("i");
range11.setLowerBound("istart");
range11.setUpperBound("iend");
assertTrue(range11.compareToDoStmt(iterationRange2));
}
Aggregations