@Test
public void testOutParamHasSideEffects() throws Exception {

  final String shader = "void main() { "
      + "   uint out1;"
      + "   uvec2 out2;"
      + "   uvec3 out3;"
      + "   uvec4 out4;"
      + "   uaddCarry(uint(0), uint(0), out1);"
      + "   uaddCarry(uvec2(0, 0), uvec2(0, 0), out2);"
      + "   uaddCarry(uvec3(0, 0, 0), uvec3(0, 0, 0), out3);"
      + "   uaddCarry(uvec4(0, 0, 0, 0), uvec4(0, 0, 0, 0), out4);"
      + "}";
  final TranslationUnit tu = ParseHelper.parse(shader, ShaderKind.FRAGMENT);
  tu.setShadingLanguageVersion(ShadingLanguageVersion.ESSL_310);
  new StandardVisitor() {
    @Override
    public void visitFunctionCallExpr(FunctionCallExpr expr) {
      assertTrue(expr.getCallee().equals("uaddCarry"));
      assertFalse(SideEffectChecker.isSideEffectFree(expr, ShadingLanguageVersion.ESSL_310,
          ShaderKind.FRAGMENT));
    }
  }.visit(tu);
}