@Test
public void nestedStruct() throws Exception {

  final String program = "struct _GLF_struct_15 {\n"
      + "    int _f0;\n"
      + "    float x1;\n"
      + "    int _f1;\n"
      + "};\n"
      + "struct _GLF_struct_16 {\n"
      + "    _GLF_struct_15 _f0;\n"
      + "};\n"
      + "void f(float x)\n"
      + "{\n"
      + "    _GLF_struct_16 _GLF_struct_replacement_17 = _GLF_struct_16(_GLF_struct_15(1, "
              + "x + 1.0, mat3(1.0)));\n"
      + "}\n";
  TranslationUnit tu = ParseHelper.parse(program);
  assertEquals(2, RemoveStructFieldReductionOpportunities
        .findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
            new ReducerContext(false, ShadingLanguageVersion.ESSL_100,
                new RandomWrapper(0), new IdGenerator())).size());
}