mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-20 13:33:51 +01:00
perl: add tests for unpacking 'float'
This commit is contained in:
parent
0ced3ec2d2
commit
233f13aac5
@ -15,7 +15,7 @@ sub pis ($$) {
|
||||
or diag( explain(unpackit($_[0])) );
|
||||
}
|
||||
|
||||
my @dat = do 't/data.pl';
|
||||
my @dat = do 't/data.pl' or die $@;
|
||||
|
||||
plan tests => 1*(scalar(@dat)/2);
|
||||
|
||||
|
@ -26,6 +26,9 @@ no warnings; # i need this, i need this.
|
||||
'aa 34 32 39 34 39 36 37 32 39 35' => ''.0xFFFFFFFF,
|
||||
'ab 36 38 37 31 39 34 37 36 37 33 35' => ''.0xFFFFFFFFF,
|
||||
|
||||
'ca 00 00 00 00' => 0.0, # float
|
||||
'ca 40 2c cc cd' => unpack('f', pack 'f', 2.7),
|
||||
|
||||
'd2 80 00 00 01' => '-2147483647', # int32_t
|
||||
'ce 80 00 00 01' => '2147483649', # uint32_t
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user