function res = test_stlInterval_representsa
% test_stlInterval_representsa - unit test function of representsa
%
% Syntax:
%    res = test_stlInterval_representsa
%
% Inputs:
%    -
%
% Outputs:
%    res - true/false
%
% Other m-files required: none
% Subfunctions: none
% MAT-files required: none
%
% See also: none

% Authors:       Florian Lercher
% Written:       16-February-2024
% Last update:   ---
% Last revision: ---

% ------------------------------ BEGIN CODE -------------------------------

res = true(0);

e = stlInterval();
o = stlInterval(0);
p = stlInterval(1);
cc = stlInterval(0,1,true,true);
co = stlInterval(0,1,true,false);
oc = stlInterval(0,1,false,true);
oo = stlInterval(0,1,false,false);

% emptiness
res(end+1) = representsa(e,'emptySet');
res(end+1) = ~representsa(p,'emptySet');
res(end+1) = ~representsa(cc,'emptySet');
res(end+1) = ~representsa(co,'emptySet');
res(end+1) = ~representsa(oc,'emptySet');
res(end+1) = ~representsa(oo,'emptySet');

% origin
res(end+1) = ~representsa(e,'origin');
res(end+1) = representsa(o,'origin');
res(end+1) = ~representsa(p,'origin');
res(end+1) = ~representsa(cc,'origin');
res(end+1) = ~representsa(co,'origin');
res(end+1) = ~representsa(oc,'origin');
res(end+1) = ~representsa(oo,'origin');

% point
res(end+1) = ~representsa(e,'point');
res(end+1) = representsa(o,'point');
res(end+1) = representsa(p,'point');
res(end+1) = ~representsa(cc,'point');
res(end+1) = ~representsa(co,'point');
res(end+1) = ~representsa(oc,'point');
res(end+1) = ~representsa(oo,'point');

% interval
res(end+1) = representsa(e,'interval');
res(end+1) = representsa(o,'interval');
res(end+1) = representsa(p,'interval');
res(end+1) = representsa(cc,'interval');
res(end+1) = ~representsa(co,'interval');
res(end+1) = ~representsa(oc,'interval');
res(end+1) = ~representsa(oo,'interval');

% zonotope
res(end+1) = representsa(e,'zonotope');
res(end+1) = representsa(o,'zonotope');
res(end+1) = representsa(p,'zonotope');
res(end+1) = representsa(cc,'zonotope');
res(end+1) = ~representsa(co,'zonotope');
res(end+1) = ~representsa(oc,'zonotope');
res(end+1) = ~representsa(oo,'zonotope');

res = all(res);

% ------------------------------ END OF CODE ------------------------------
