@Test
public void testRemoveParam() throws Exception {

  final String shader = "float foo(int a, float b, float c) {"
      + "  return b;"
      + "}"
      + ""
      + "void main() {"
      + "  foo(5, 4.0, 2.0);"
      + "}";
  final String expectedResult = "float foo(float b) {"
      + "  return b;"
      + "}"
      + ""
      + "void main() {"
      + "  foo(4.0);"
      + "}";
  final TranslationUnit tu = ParseHelper.parse(shader);
  List<RemoveUnusedParameterReductionOpportunity> opportunities =
      findOpportunities(tu, true);
  assertEquals(2, opportunities.size());
  opportunities.get(0).applyReduction();
  opportunities =
      findOpportunities(tu, true);
  assertEquals(1, opportunities.size());
  opportunities.get(0).applyReduction();
  CompareAsts.assertEqualAsts(expectedResult, tu);
}