% Regression test function (black blox) for FreeMat v4.0
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_import
  bbtest_success = 1;
NumErrors = 0;
try
  if (strcmp(computer,'MAC')) system('gcc -bundle -flat_namespace -undefined suppress -o add.so addArrays.c'); end;

catch
  NumErrors = NumErrors + 1;
end
try
  if (~strcmp(computer,'MAC')) system('gcc -shared -fPIC -o add.so addArrays.c'); end;

catch
  NumErrors = NumErrors + 1;
end
try
  import('add.so','addArrays','addArrays','void','int32 N, float[N] a, float[N] b, float[N] &c');

catch
  NumErrors = NumErrors + 1;
end
try
  a = [3,2,3,1];

catch
  NumErrors = NumErrors + 1;
end
try
  b = [5,6,0,2]; 

catch
  NumErrors = NumErrors + 1;
end
try
  c = [0,0,0,0];

catch
  NumErrors = NumErrors + 1;
end
try
  addArrays(length(a),a,b,c)

catch
  NumErrors = NumErrors + 1;
end
try
  c

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
