use of claw.shenron.translator.AnalyzedPragma in project claw-compiler by C2SM-RCM.
the class TransformationAndGroupTest method basicTransformationTest.
@Test
public void basicTransformationTest() {
Transformation t1 = new T1();
assertTrue(t1.abortOnFailedAnalysis());
assertEquals(0, t1.getStartLine());
t1.setStartLine(10);
assertEquals(10, t1.getStartLine());
assertNull(t1.getDirective());
assertFalse(t1.isTransformed());
Context context = new TestContext();
XcodeProgram xcodeml = XmlHelper.getDummyXcodeProgram(context);
Xnode pragma = xcodeml.createNode(Xcode.F_PRAGMA_STATEMENT);
pragma.setLine(10);
t1 = new T1(new AnalyzedPragma(pragma));
assertNotNull(t1.getDirective());
assertNotNull(t1.getDirective().getPragma());
assertEquals(10, t1.getStartLine());
}
Aggregations