ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Types-Serialiser/t/51_types.t
Revision: 1.1
Committed: Mon Oct 28 15:28:44 2013 UTC (10 years, 8 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-1_0, rel-0_03, rel-0_02
Log Message:
*** empty log message ***

File Contents

# Content
1 BEGIN { $| = 1; print "1..20\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