@Test
public void testParseAndPrintSwitch() throws Exception {

  final String program = ""
      + "void main()\n"
      + "{\n"
      + PrettyPrinterVisitor.defaultIndent(1) + "int x = 3;\n"
      + PrettyPrinterVisitor.defaultIndent(1) + "switch(x)\n"
      + PrettyPrinterVisitor.defaultIndent(2) + "{\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "case 0:\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "x ++;\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "case 1:\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "case 3:\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "x ++;\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "break;\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "case 4:\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "break;\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "default:\n"
      + PrettyPrinterVisitor.defaultIndent(3) + "break;\n"
      + PrettyPrinterVisitor.defaultIndent(2) + "}\n"
      + "}\n";
  TranslationUnit tu = ParseHelper.parse(program);
  CompareAstsDuplicate.assertEqualAsts(tu, tu.clone());
}