forked from tjhickey724/OctaveBat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_equalsIsNot.m
49 lines (28 loc) · 884 Bytes
/
test_equalsIsNot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
% Tarif Riyad Rahman
% MATLAB syntax used
% This is the test bed for the function commonTwo
% sample cases are used for testing the correctness of the function
% All test cases added by Tarif Riyad Rahman.. New Test Bed for New Solution
function e=test_equalsIsNot()
e=0;
e=e+runtest('isisnot',0);
e=e+runtest('isnot',1);
e=e+runtest('isnotnot',0);
e=e+runtest('notnot',0);
e=e+runtest('isxnotanotis',1);
e=e+runtest('is',0);
e=e+runtest('aisnota',1);
e=e+runtest('ii',1);
e=e+runtest('ee',1);
e=e+runtest('notisisnot',1);
end
function e=runtest(str1,answer)
result=equalIsNot(str1);
if result==answer
e=0;
fprintf('equalIsNot(%s)=%d\n',str1,answer);
else
e=1;
fprintf('equalIsNot(%s)=%d<>%d\n',str1,result,answer);
end
end