@Test
public void testTooLargeToInline() throws Exception {

  final StringBuilder program = new StringBuilder();
  program.append("int donotinlineme(int x) { int y = 2;");
  for (int i = 0; i < 100; i++) {
    program.append(" y = y + x;");
  }
  program.append("}");
  program.append("void main() { int z = donotinlineme(5); }");
  final TranslationUnit tu = ParseHelper.parse(program.toString());
  final ShaderJob shaderJob = MakeShaderJobFromFragmentShader.make(tu);
  final List<InlineFunctionReductionOpportunity> ops =
      InlineFunctionReductionOpportunities.findOpportunities(shaderJob,
          new ReducerContext(true,
              ShadingLanguageVersion.ESSL_100, new RandomWrapper(0), new IdGenerator()));
  assertEquals(0, ops.size());
}