Skip to content

Commit

Permalink
Test FatRat with %d.
Browse files Browse the repository at this point in the history
  • Loading branch information
colomon committed Jul 19, 2013
1 parent 9254143 commit 43db15c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion S32-str/sprintf.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 126;
plan 128;

# L<S32::Str/Str/"identical to" "C library sprintf">

Expand Down Expand Up @@ -100,6 +100,12 @@ is sprintf('%03X', 42.6), '02A', '0-padded decimal %X';
is sprintf('%d', -453973694165307953197296969697410619233826 - .1),
"-453973694165307953197296969697410619233826",
'%d works for negative big Rats';
is sprintf('%d', (453973694165307953197296969697410619233826 + .1).FatRat),
"453973694165307953197296969697410619233826",
'%d works for big FatRats';
is sprintf('%d', (-453973694165307953197296969697410619233826 - .1).FatRat),
"-453973694165307953197296969697410619233826",
'%d works for negative big FatRats';
is sprintf('%b', 453973694165307953197296969697410619233826 + .1),
"1010011011000011011110110010010011111011100010110000111011001101110011001010011001110100101011101101011001111110001010100110101011000100010",
'%b works for big Rats';
Expand Down

0 comments on commit 43db15c

Please sign in to comment.