add arithm10.pas to test suite
This commit is contained in:
parent
2d2b7a3feb
commit
553efb3e86
28
TestSuite/arithm10.pas
Normal file
28
TestSuite/arithm10.pas
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
var
|
||||||
|
sh : shortint;
|
||||||
|
sm : smallint;
|
||||||
|
i : integer;
|
||||||
|
li : int64;
|
||||||
|
f: single;
|
||||||
|
r: real;
|
||||||
|
|
||||||
|
begin
|
||||||
|
sh := 1;
|
||||||
|
sm := 1;
|
||||||
|
i := 1;
|
||||||
|
li := 1;
|
||||||
|
f := 1;
|
||||||
|
r := 1;
|
||||||
|
sh := -sh;
|
||||||
|
sm := -sm;
|
||||||
|
i := -i;
|
||||||
|
li := -li;
|
||||||
|
f := -f;
|
||||||
|
r := -r;
|
||||||
|
assert(sh = -1);
|
||||||
|
assert(sm = -1);
|
||||||
|
assert(i = -1);
|
||||||
|
assert(li = -1);
|
||||||
|
assert(abs(r+1) < 0.00001);
|
||||||
|
assert(abs(f+1) < 0.00001);
|
||||||
|
end.
|
||||||
Loading…
Reference in a new issue