% Regression test function (black blox) for FreeMat v4.0
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_indexing
  bbtest_success = 1;
NumErrors = 0;
try
  A = zeros(4)

catch
  NumErrors = NumErrors + 1;
end
try
  B = float(randn(2))

catch
  NumErrors = NumErrors + 1;
end
try
  A(2:3,2:3) = B

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  C = A(2:3,1:end)

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  C = A(2:3,:)

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  D = zeros(2,2,3)

catch
  NumErrors = NumErrors + 1;
end
try
  D(:,:,2) = int32(10*rand(2,2))

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  A = zeros(4)

catch
  NumErrors = NumErrors + 1;
end
try
  v = [1;2;3;4]

catch
  NumErrors = NumErrors + 1;
end
try
  A(2:3,2:3) = v

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  A = {1, 'hello', [1:4]}

catch
  NumErrors = NumErrors + 1;
end
try
  A(1:2)

catch
  NumErrors = NumErrors + 1;
end
try
  A{1:2}

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  A = {[1,3,0],[5,2,7]}

catch
  NumErrors = NumErrors + 1;
end
try
  max(A{1:end})

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  [K{1:2}] = max(randn(1,4))

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  C = [A{1};A{2}]

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

catch
  NumErrors = NumErrors + 1;
end
try
  A.color = 'blue'

catch
  NumErrors = NumErrors + 1;
end
try
  B = A.color

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

catch
  NumErrors = NumErrors + 1;
end
try
  A(1).maxargs = [1,6,7,3]

catch
  NumErrors = NumErrors + 1;
end
try
  A(2).maxargs = [5,2,9,0]

catch
  NumErrors = NumErrors + 1;
end
try
  max(A.maxargs)

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

catch
  NumErrors = NumErrors + 1;
end
try
  A(1).maxreturn = [];

catch
  NumErrors = NumErrors + 1;
end
try
  A(2).maxreturn = [];

catch
  NumErrors = NumErrors + 1;
end
try
  [A.maxreturn] = max(randn(1,4))

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  x.red = 430;

catch
  NumErrors = NumErrors + 1;
end
try
  x.green = 240;

catch
  NumErrors = NumErrors + 1;
end
try
  x.blue = 53;

catch
  NumErrors = NumErrors + 1;
end
try
  x.yello = 105

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  y = 'green'

catch
  NumErrors = NumErrors + 1;
end
try
  a = x.(y)

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  Z{3}.foo(2) = pi

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