diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 15:16:29 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2021-03-06 15:16:29 +0000 |
commit | ef0cc1f53381e96732a9b579315e41a22816572e (patch) | |
tree | f19399efb53a14488e0b18fab7beaaee675cff53 | |
parent | f4bc73d68c671b6c2db605995463c65175a84453 (diff) | |
download | fpc-ef0cc1f53381e96732a9b579315e41a22816572e.tar.gz |
* fix test so it really uses random values for the boolean, thanks Jonas for the hint!
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@48887 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | tests/test/tandorandnot1.pp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test/tandorandnot1.pp b/tests/test/tandorandnot1.pp index f67e5dd7cd..2890f9d202 100644 --- a/tests/test/tandorandnot1.pp +++ b/tests/test/tandorandnot1.pp @@ -41,11 +41,11 @@ procedure test_boolean; begin for i:=1 to 100 do begin - a:=boolean(random(1)); + a:=boolean(random(2)); _a:=a; - b:=boolean(random(1)); + b:=boolean(random(2)); _b:=b; - c:=boolean(random(1)); + c:=boolean(random(2)); _c:=c; if (a and b) or (c and not(b))<>_c xor ((_c xor _a) and _b) then begin @@ -87,7 +87,7 @@ procedure test_pboolean; _b:=b^; c:=nil; { c should not matter in this case } - _c:=boolean(random(1)); + _c:=boolean(random(2)); if (a^ and b^) or (c^ and not(b^))<>_c xor ((_c xor _a) and _b) then begin writeln('Error: ','a=',a^,'b=',b^,'c=',c^); |