@Test public void testWhileStatement1() throws Exception {
ElementSymbol x = new ElementSymbol("x", false);
Function f = new Function("+", new Expression[] { x, new Constant(new Integer(1)) });
Statement assignmentStmt = new AssignmentStatement(x, f);
Block block = new Block();
block.setAtomic(true);
block.setLabel("1y");
block.addStatement(assignmentStmt);
BranchingStatement bs = new BranchingStatement(BranchingMode.CONTINUE);
bs.setLabel("1y");
block.addStatement(bs);
Criteria crit = new CompareCriteria(x, CompareCriteria.LT,
new Constant(new Integer(100)));
WhileStatement whileStmt = new WhileStatement(crit, block);
helpStmtTest("WHILE (x < 100) \"1y\": BEGIN ATOMIC x=x+1; CONTINUE \"1y\"; END",
"WHILE(x < 100)"+"\n"+ "\"1y\" : BEGIN ATOMIC"+"\n"+"x = (x + 1);\nCONTINUE \"1y\";"
+"\n"+"END", whileStmt);
}