Skip to content

Commit

Permalink
Changed syntax and added a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
adas88 committed May 8, 2011
1 parent d6121e2 commit 4af21a9
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions test_dividesSelf.m
Expand Up @@ -6,24 +6,28 @@
% Modified by Ritu Pradhan
% Added 3 test cases.
% add 1 test for this function by Kai Wu
% Add 1 more test case - Abhirup Das
% Also MATLAB doesn't process += so changed syntax accordingly - Abhirup
% Das

e=0;
e+= runTest(128,1);
e+= runTest(12,1);
e+= runTest(120,0);
e+= runTest(13,0);
e+= runTest(32,0);
e+= runTest(22,1);
e+= runTest(42,0);
e+= runTest(212,1);
e+= runTest(213,0);
e+= runTest(162,1);

e+= runTest(0,0);
e+= runTest(4560,0);
e+= runTest(122,1);

e+= runTest(203,0); %by Kai Wu
e= e + runTest(128,1);
e= e + runTest(22,1);
e= e +runTest(12,1);
e= e +runTest(120,0);
e= e +runTest(13,0);
e= e +runTest(32,0);
e= e +runTest(22,1);
e= e +runTest(42,0);
e= e +runTest(212,1);
e= e +runTest(213,0);
e= e +runTest(162,1);

e= e +runTest(0,0);
e= e +runTest(4560,0);
e= e +runTest(122,1);

e= e +runTest(203,0); %by Kai Wu
end

function k = runTest(a,answer)
Expand Down

0 comments on commit 4af21a9

Please sign in to comment.