@Test
public void testReplace() throws Exception {

  final String program = ""
      + "float foo(vec3 p, vec2 t) {"
      + "  vec2 q = vec2(0.0);"
      + "  return 0.0;"
      + "}"
      + "void main() { }";
  final TranslationUnit tu = ParseHelper.parse(program);
  final PipelineInfo pipelineInfo = new PipelineInfo();
  FloatLiteralReplacer.replace(tu, pipelineInfo);
  final String expectedProgram = ""
      + "uniform float _FLOAT_CONST[1];"
      + "float foo(vec3 p, vec2 t) {"
      + "  vec2 q = vec2(_FLOAT_CONST[0]);"
      + "  return _FLOAT_CONST[0];"
      + "}"
      + "void main() { }";
  CompareAsts.assertEqualAsts(expectedProgram, tu);
}