
tic ()
buttons = {"Yes", "No", "Cancel"};
errors = 0;
for i=1:1000000
  for j=0:2
    res = questdlg ("Hello World?", "Force an outcome", buttons{1}, buttons{2}, buttons{3}, buttons{3}, j);
    if !strcmp (res, buttons{j+1});
      display ("Error found for:");
      i
      j
      errors = errors + 1;
    end
  end
end
errors
toc ()

