@Test
public void testOutline3() throws Exception {

  String program = "uniform vec2 injectionSwitch;"
      + "int _GLF_outlined_1(int x, int y, int z) { return injectionSwitch.y * x + (x + y) + z; }"
      + "void main() { int a, b, c; y = _GLF_outlined_1(0, a, b + c); }";
  String programAfter = "uniform vec2 injectionSwitch;"
      + "int _GLF_outlined_1(int x, int y, int z) { return injectionSwitch.y * x + (x + y) + z; }"
      + "void main() { int a, b, c; y = injectionSwitch.y * 0 + (0 + a) + b + c; }";
  TranslationUnit tu = ParseHelper.parse(program);
  List<OutlinedStatementReductionOpportunity> ops = OutlinedStatementReductionOpportunities
      .findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
      new ReducerContext(false, ShadingLanguageVersion.ESSL_100,
          new RandomWrapper(0), new IdGenerator()));
  assertEquals(1, ops.size());
  ops.get(0).applyReduction();
  assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(programAfter)),
      PrettyPrinterVisitor.prettyPrintAsString(tu));
}