| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use MyTest; |
| 4 |
use UUID (); |
| 5 |
|
| 6 |
|
| 7 |
# duplicate failing test 23 from the old test |
| 8 |
|
| 9 |
my ($bin, $bin1, $bin2); |
| 10 |
|
| 11 |
$bin = 'bogus value'; |
| 12 |
is UUID::is_null( $bin ), 0, 'old 21'; # != the null uuid, right? |
| 13 |
|
| 14 |
$bin = '1234567890123456'; |
| 15 |
is UUID::is_null( $bin ), 0, 'old 22'; # still not null |
| 16 |
|
| 17 |
#-------------------------------------------------------------------> last seen here dumps core below |
| 18 |
|
| 19 |
# make sure compare operands sane |
| 20 |
UUID::generate( $bin1 ); |
| 21 |
$bin2 = 'x'; |
| 22 |
is abs(UUID::compare( $bin1, $bin2 )), 1, 'old 23'; |
| 23 |
is abs(UUID::compare( $bin2, $bin1 )), 1, 'old 24'; |
| 24 |
$bin2 = 'some silly ridiculously long string that couldnt possibly be a uuid'; |
| 25 |
is abs(UUID::compare( $bin1, $bin2 )), 1, 'old 25'; |
| 26 |
is abs(UUID::compare( $bin2, $bin1 )), 1, 'old 26'; |
| 27 |
|
| 28 |
done_testing; |