@Test
public void testGetRidOfLeftOverLoopLimiterReferences1() throws Exception {

  final String loopLimiterName = loopLimiter(0);
  final String program = ""
      + "#version 310 es\n"
      + "void main() {\n"
      + "  int " + loopLimiterName + " = 0;\n"
      + "  " + loopLimiterName + "++;\n"
      + "}\n";
  final TranslationUnit tu = ParseHelper.parse(program);
  final List<StmtReductionOpportunity> ops = StmtReductionOpportunities.findOpportunities(
      MakeShaderJobFromFragmentShader.make(tu),
      new ReducerContext(false, ShadingLanguageVersion.ESSL_310, new RandomWrapper(0),
          new IdGenerator()));
  assertEquals(1, ops.size());
  ops.get(0).applyReduction();
  final String expected = ""
      + "#version 310 es\n"
      + "void main() {\n"
      + "  int " + loopLimiterName + " = 0;\n"
      + "}\n";
  CompareAsts.assertEqualAsts(expected, tu);
}