Commit | Line | Data |
a0d0e21e |
1 | #!./perl |
2 | |
3 | #From jhi@snakemail.hut.fi Mon May 16 10:36:46 1994 |
4 | #Date: Sun, 15 May 1994 20:39:09 +0300 |
5 | #From: Jarkko Hietaniemi <jhi@snakemail.hut.fi> |
6 | |
7 | print "1..2\n"; |
8 | |
9 | $n = 1000; |
10 | |
11 | $c = 0; |
12 | for (1..$n) { |
13 | last if (rand() > 1 || rand() < 0); |
14 | $c++; |
15 | } |
16 | |
17 | if ($c == $n) {print "ok 1\n";} else {print "not ok 1\n"} |
18 | |
19 | $c = 0; |
20 | for (1..$n) { |
21 | last if (rand(10) > 10 || rand(10) < 0); |
22 | $c++; |
23 | } |
24 | |
25 | if ($c == $n) {print "ok 2\n";} else {print "not ok 2\n"} |