@Test
public void misc() throws Exception {

  final String shader = "void main()\n"
        + "{\n"
        + "    float x;\n"
        + "    for(\n"
        + "        int i = 0;\n"
        + "        _GLF_IDENTITY(i, i) < 10;\n"
        + "        i ++\n"
        + "    )\n"
        + "        {\n"
        + "            {\n"
        + "                if(_GLF_DEAD(false))\n"
        + "                    {\n"
        + "                    }\n"
        + "                x = 1.0;\n"
        + "            }\n"
        + "        }\n"
        + "}\n";
  TranslationUnit tu = ParseHelper.parse(shader);
  final String expectedStmt = "x = 1.0;";
  assertTrue(PrettyPrinterVisitor.prettyPrintAsString(tu).contains(expectedStmt));
  IRandom generator = new RandomWrapper(1);
  List<UnwrapReductionOpportunity> ops = UnwrapReductionOpportunities
      .findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
          new ReducerContext(false, ShadingLanguageVersion.ESSL_100, generator,
              new IdGenerator()));
  assertEquals(1, ops.size());
  ops.get(0).applyReduction();
  assertTrue(PrettyPrinterVisitor.prettyPrintAsString(tu).contains(expectedStmt));
}