| 1 |
BEGIN { $| = 1; print "1..24\n"; } |
| 2 |
|
| 3 |
use Types::Serialiser; |
| 4 |
|
| 5 |
print "ok 1\n"; |
| 6 |
|
| 7 |
$dec = Types::Serialiser::false; |
| 8 |
print !Types::Serialiser::is_true $dec ? "" : "not ", "ok 2\n"; |
| 9 |
print Types::Serialiser::is_false $dec ? "" : "not ", "ok 3\n"; |
| 10 |
print Types::Serialiser::is_bool $dec ? "" : "not ", "ok 4\n"; |
| 11 |
print $dec == 0 ? "" : "not ", "ok 5\n"; |
| 12 |
print !$dec == 1 ? "" : "not ", "ok 6\n"; |
| 13 |
print $dec eq 0 ? "" : "not ", "ok 7\n"; |
| 14 |
print $dec-1 < 0 ? "" : "not ", "ok 8\n"; |
| 15 |
print $dec+1 > 0 ? "" : "not ", "ok 9\n"; |
| 16 |
print $dec*2 == 0 ? "" : "not ", "ok 10\n"; |
| 17 |
|
| 18 |
$dec = Types::Serialiser::true; |
| 19 |
print Types::Serialiser::is_true $dec ? "" : "not ", "ok 11\n"; |
| 20 |
print !Types::Serialiser::is_false $dec ? "" : "not ", "ok 12\n"; |
| 21 |
print Types::Serialiser::is_bool $dec ? "" : "not ", "ok 13\n"; |
| 22 |
print $dec == 1 ? "" : "not ", "ok 14\n"; |
| 23 |
print !$dec == 0 ? "" : "not ", "ok 15\n"; |
| 24 |
print $dec eq 1 ? "" : "not ", "ok 16\n"; |
| 25 |
print $dec-1 <= 0 ? "" : "not ", "ok 17\n"; |
| 26 |
print $dec-2 < 0 ? "" : "not ", "ok 18\n"; |
| 27 |
print $dec*2 == 2 ? "" : "not ", "ok 19\n"; |
| 28 |
|
| 29 |
$dec = Types::Serialiser::error; |
| 30 |
print Types::Serialiser::is_error $dec ? "" : "not ", "ok 20\n"; |
| 31 |
|
| 32 |
print Types::Serialiser::is_true Types::Serialiser::as_bool 0 ? "not " : "", "ok 21\n"; |
| 33 |
print Types::Serialiser::is_false Types::Serialiser::as_bool 1 ? "not " : "", "ok 22\n"; |
| 34 |
print Types::Serialiser::is_true Types::Serialiser::as_bool 0 ? "not " : "", "ok 23\n"; |
| 35 |
print Types::Serialiser::is_false Types::Serialiser::as_bool 1 ? "not " : "", "ok 24\n"; |