@Test
public void testDoNotReplaceConst() throws Exception {

  final String original = "const int a = 1; void main() { }";
  final TranslationUnit tu = ParseHelper.parse(original);
  final List<GlobalVariableDeclToExprReductionOpportunity> ops =
      GlobalVariableDeclToExprReductionOpportunities
          .findOpportunities(MakeShaderJobFromFragmentShader.make(tu), new ReducerContext(true,
              ShadingLanguageVersion.ESSL_100,
              new RandomWrapper(0), new IdGenerator()));
  // There should be no opportunities as it is invalid to declare constant variable
  // without an initial value.
  assertTrue(ops.isEmpty());
}