@Test
public void testParsingComma1() throws Exception {

  final TranslationUnit tu = ParseHelper.parse(""
      + "void main() {\n"
      + "  bool b, c;\n"
      + "  int x, y;\n"
      + "  b, c ? x : y;\n"
      + "  b ? c, x : y;\n"
      + "  b ? x : y, c;\n"
      + "}\n");
  final BlockStmt block = tu.getMainFunction().getBody();
  assertTrue(block.getStmt(0) instanceof DeclarationStmt);
  assertTrue(block.getStmt(1) instanceof DeclarationStmt);
  {
    final ExprStmt exprStmt = (ExprStmt) block.getStmt(2);
    assertTrue(exprStmt.getExpr() instanceof BinaryExpr);
    final BinaryExpr binaryExpr = (BinaryExpr) exprStmt.getExpr();
    assertEquals(BinOp.COMMA, binaryExpr.getOp());
    assertTrue(binaryExpr.getLhs() instanceof VariableIdentifierExpr);
    assertTrue(binaryExpr.getRhs() instanceof TernaryExpr);
  }
  {
    final ExprStmt exprStmt = (ExprStmt) block.getStmt(3);
    assertTrue(exprStmt.getExpr() instanceof TernaryExpr);
    final TernaryExpr ternaryExpr = (TernaryExpr) exprStmt.getExpr();
    assertTrue(ternaryExpr.getTest() instanceof VariableIdentifierExpr);
    assertTrue(ternaryExpr.getThenExpr() instanceof BinaryExpr);
    assertEquals(BinOp.COMMA, ((BinaryExpr) ternaryExpr.getThenExpr()).getOp());
    assertTrue(ternaryExpr.getElseExpr() instanceof VariableIdentifierExpr);
  }
  {
    final ExprStmt exprStmt = (ExprStmt) block.getStmt(4);
    assertTrue(exprStmt.getExpr() instanceof BinaryExpr);
    final BinaryExpr binaryExpr = (BinaryExpr) exprStmt.getExpr();
    assertEquals(BinOp.COMMA, binaryExpr.getOp());
    assertTrue(binaryExpr.getLhs() instanceof TernaryExpr);
    assertTrue(binaryExpr.getRhs() instanceof VariableIdentifierExpr);
  }
}