@Test
public void reduceRedundantStuff() throws Exception {

  final String program = "void main() { int a; a = a; }";
  final String expected = "void main() { }";
  final TranslationUnit tu = ParseHelper.parse(program);
  while (true) {
    List<IReductionOpportunity> ops = ReductionOpportunities.getReductionOpportunities(
          MakeShaderJobFromFragmentShader.make(tu), new ReducerContext(false,
            ShadingLanguageVersion.GLSL_440,
          new RandomWrapper(0), new IdGenerator()), fileOps);
    if (ops.isEmpty()) {
      break;
    }
    ops.get(0).applyReduction();
  }
  assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(expected)),
      PrettyPrinterVisitor.prettyPrintAsString(tu));
}