@Test
public void testDeadConditionalNotReplaced() throws Exception {

  // Regression test for a bug where the guard of a dead conditional was being replaced by "true"
  String prog = "void main() {"
      + "if(" + Constants.GLF_DEAD + "(" + Constants.GLF_IDENTITY + "(false, true && "
      + Constants.GLF_IDENTITY + "(false, (true ? false : " + Constants.GLF_FUZZED
      + "(true)))))) {"
      + "  }"
      + "}\n";
  TranslationUnit tu = ParseHelper.parse(prog);
  List<IReductionOpportunity> opportunities =
      ReductionOpportunities.getReductionOpportunities(MakeShaderJobFromFragmentShader.make(tu),
            new ReducerContext(false, ShadingLanguageVersion.ESSL_100,
          new RandomWrapper(0), new IdGenerator()), fileOps);
  // There should be no ExprToConstant reduction opportunity, because the expressions do not occur
  // under dead code, and the fuzzed expression is too simple to be reduced.
  assertFalse(opportunities.stream().anyMatch(
      item -> item instanceof SimplifyExprReductionOpportunity));
}