summaryrefslogtreecommitdiffstats
path: root/pintos-progos/tests/lib.pm
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2012-03-27 11:51:08 +0200
committermanuel <manuel@mausz.at>2012-03-27 11:51:08 +0200
commit4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b (patch)
tree868c52e06f207b5ec8a3cc141f4b8b2bdfcc165c /pintos-progos/tests/lib.pm
parenteae0bd57f0a26314a94785061888d193d186944a (diff)
downloadprogos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.gz
progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.bz2
progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.zip
reorganize file structure to match the upstream requirements
Diffstat (limited to 'pintos-progos/tests/lib.pm')
-rw-r--r--pintos-progos/tests/lib.pm19
1 files changed, 0 insertions, 19 deletions
diff --git a/pintos-progos/tests/lib.pm b/pintos-progos/tests/lib.pm
deleted file mode 100644
index bc37ae5..0000000
--- a/pintos-progos/tests/lib.pm
+++ /dev/null
@@ -1,19 +0,0 @@
1use strict;
2use warnings;
3
4use tests::random;
5
6sub shuffle {
7 my ($in, $cnt, $sz) = @_;
8 $cnt * $sz == length $in or die;
9 my (@a) = 0...$cnt - 1;
10 for my $i (0...$cnt - 1) {
11 my ($j) = $i + random_ulong () % ($cnt - $i);
12 @a[$i, $j] = @a[$j, $i];
13 }
14 my ($out) = "";
15 $out .= substr ($in, $_ * $sz, $sz) foreach @a;
16 return $out;
17}
18
191;