diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-29 08:56:15 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-29 08:56:15 +0000 |
commit | c5a0f51aeadf6b8a7ed259c017c10b71dbc08619 (patch) | |
tree | c47d27d20129ef24f03229df5eda2427947be4fb /t | |
parent | e1341489138a2cd535f7aa4b4d9dde4f07557806 (diff) | |
download | perl-c5a0f51aeadf6b8a7ed259c017c10b71dbc08619.tar.gz |
Implement 64-bit vec().
p4raw-id: //depot/cfgperl@4035
Diffstat (limited to 't')
-rw-r--r-- | t/op/64bit.t | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/t/op/64bit.t b/t/op/64bit.t index 4da3a9e2e8..d35254be24 100644 --- a/t/op/64bit.t +++ b/t/op/64bit.t @@ -10,14 +10,14 @@ BEGIN { # This could use a lot of more tests. # -# Nota bene: bit operations (&, |, ^, ~, <<, >>, vec) are not 64-bit clean. +# Nota bene: bit operations (&, |, ^, ~, <<, >>) are not 64-bit clean. # See the beginning of pp.c and the explanation next to IBW/UBW. -# so that using > 0xfffffff constants and 32+ bit -# shifts and vector sizes doesn't cause noise -no warning 'overflow'; +# so that using > 0xfffffff constants and +# 32+ bit vector sizes doesn't cause noise +no warning qw(overflow portable); -print "1..36\n"; +print "1..39\n"; my $q = 12345678901; my $r = 23456789012; @@ -190,3 +190,14 @@ print "not " unless $a == -9223372036854775809; print "ok 36\n"; +$x = ''; +print "not " unless (vec($x, 1, 64) = $q) == $q; +print "ok 37\n"; + +print "not " unless vec($x, 1, 64) == $q && vec($x, 1, 64) > $f; +print "ok 38\n"; + +print "not " unless vec($x, 0, 64) == 0 && vec($x, 2, 64) == 0; +print "ok 39\n"; + +# eof |