@Test
public void testNamedStruct() throws Exception {

  final String program = "struct A { int x; } b; void main() { A c; c.x = 2; }\n";
  final String reducedProgram = "struct A { int x; }; void main() { A c; c.x = 2; }\n";
  final TranslationUnit tu = ParseHelper.parse(program);
  List<VariableDeclReductionOpportunity> ops = VariableDeclReductionOpportunities
      .findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
          new ReducerContext(false, ShadingLanguageVersion.ESSL_100,
          new RandomWrapper(0), new IdGenerator()));
  assertEquals(1, ops.size());
  ops.get(0).applyReduction();
  CompareAsts.assertEqualAsts(reducedProgram, tu);
}