@Test
public void testMakeArrayParameterAccessInBounds2() throws Exception {

  final String shader = "#version 310 es\n"
      + "const int N = 3;\n"
      + "int foo(int A[N], int x) {\n"
      + "  return A[x];\n"
      + "}\n"
      + "void main() {\n"
      + "  int A[N];\n"
      + "  foo(A, 7);\n"
      + "}\n";
  final String expected = "#version 310 es\n"
      + "const int N = 3;\n"
      + "int foo(int A[N], int x) {\n"
      + "  return A[" + Constants.GLF_MAKE_IN_BOUNDS_INT + "(x, 3)];\n"
      + "}\n"
      + "void main() {\n"
      + "  int A[N];\n"
      + "  foo(A, 7);\n"
      + "}\n";
  final TranslationUnit tu = ParseHelper.parse(shader);
  MakeArrayAccessesInBounds.makeInBounds(tu);
  CompareAsts.assertEqualAsts(expected, tu);
}