@Test
public void testGlobalVariableDeclAfterMain() throws Exception {

  // The global variable declarations that have found after main method will not be considered.
  final String original = "void main() { } int a = 1;";
  final TranslationUnit tu = ParseHelper.parse(original);
  final List<GlobalVariableDeclToExprReductionOpportunity> ops =
      GlobalVariableDeclToExprReductionOpportunities
          .findOpportunities(MakeShaderJobFromFragmentShader.make(tu), new ReducerContext(false,
              ShadingLanguageVersion.ESSL_100,
              new RandomWrapper(0), new IdGenerator()));
  assertTrue(ops.isEmpty());
}