@Test
public void testEmptyBlock() throws Exception {

  final String program = "void main() {"
        + "  {"
        + "  }"
        + "}";
  final String reducedProgram = "void main() {"
        + "}";
  final TranslationUnit tu = ParseHelper.parse(program);
  List<? extends IReductionOpportunity> ops =
        StmtReductionOpportunities.findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
              new ReducerContext(false, ShadingLanguageVersion.ESSL_100,
                  new RandomWrapper(0), new IdGenerator()));
  assertEquals(1, ops.size());
  assertTrue(ops.get(0) instanceof StmtReductionOpportunity);
  ops.get(0).applyReduction();
  assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(reducedProgram)),
        PrettyPrinterVisitor.prettyPrintAsString(tu));
}