Created
November 20, 2009 15:06
-
-
Save masterzen/239550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
BEGIN { | |
require 'mysql-agent'; | |
} | |
use Data::Dumper; | |
use Test::More tests => 9; | |
$innodb_parser = InnoDBParser->new; | |
s( | |
$innodb_parser->make_bigint('0', '1170663853'), | |
'1170663853', | |
'make_bigint 0 1170663853' | |
); | |
is( | |
$innodb_parser->make_bigint('1', '504617703'), | |
'4799584999', | |
'make_bigint 1 504617703' | |
); | |
is( | |
$innodb_parser->make_bigint('EF861B144C'), | |
'1028747105356', | |
'make_bigint EF861B144C' | |
); | |
is( | |
$innodb_parser->tonum('0'), | |
'0', | |
'tonum 0' | |
); | |
is( | |
$innodb_parser->tonum(), | |
'0', | |
'tonum undef' | |
); | |
is( | |
$innodb_parser->tonum('74900191315') - $innodb_parser->tonum('1170664159'), | |
'73729527156', | |
'substraction 1170664159 74900191315' | |
); | |
is( | |
$innodb_parser->tonum('39731928'), | |
'39731928', | |
'should get 39731928' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment