Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed CPAN RT bug #85332 Changes is 0 bytes (this file)
* Fixed CPAN RT bug #87221 Division by Zero * t/15_zeroes.t: Added tests for divisions by zero * t/16_decimals.t: Added tests for unsupported non-integer arguments
- Loading branch information
Theo van Hoesel
authored and
Th.J.v.Hoesel
committed
Jul 25, 2013
1 parent
57a57c9
commit ba69da8
Showing
4 changed files
with
186 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
2013-07-25 Theo van Hoesel <Th.J.v.Hoesel@gmail.com> | ||
|
||
* Fixed CPAN RT bug #85332 Changes is 0 bytes (this file) | ||
|
||
* Fixed CPAN RT bug #87221 Division by Zero | ||
|
||
* t/15_zeroes.t: Added tests for divisions by zero | ||
|
||
* t/16_decimals.t: Added tests for unsupported non-integer arguments | ||
|
||
2013-05-14 Dave Cross <dave@dave.org.uk> | ||
|
||
* Version 2: Now With Added Moose | ||
|
||
2011-11-26 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm: Fix typo in docs. | ||
|
||
* lib/Number/Fraction.pm: Bump version number. | ||
|
||
* MANIFEST, t/14_abs.t: Added more tests for 'abs'. Added META.json to | ||
MANIFEST. | ||
|
||
2011-11-24 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm: Implemented the 'abs' function. Tests now pass. | ||
|
||
* t/14_abs.t: Added test for the 'abs' function. | ||
|
||
2010-03-21 Dave Cross <dave@angel.mag-sol.com> | ||
|
||
* lib/Number/Fraction.pm: Added documentation for the exponentiation support. | ||
|
||
* lib/Number/Fraction.pm, t/13_exp.t: Added simple support for | ||
exponentiation. | ||
|
||
2010-03-15 Dave Cross <dave@angel.mag-sol.com> | ||
|
||
* t/13_exp.t: Added tests for exponentiation. And they all pass without any | ||
code changes! | ||
|
||
2010-02-09 Dave Cross <dave@dacross.(none)> | ||
|
||
* lib/Number/Fraction.pm: Fixed a couple of typos in the Pod. Thanks to | ||
Kornel Umann for spotting them. | ||
|
||
2009-06-15 Dave Cross <dave@dave.org.uk> | ||
|
||
* Build.PL, lib/Number/Fraction.pm, t/12_invalid.t: Fixed CPAN RT bug #46961 | ||
(and added tests). Move VERSION setting into Number/Fraction.pm. | ||
|
||
2009-02-21 Dave Cross <dave@dave.org.uk> | ||
|
||
* : Removed execute bits on tests. | ||
|
||
2008-03-09 Dave Cross <dave@dave.org.uk> | ||
|
||
* Build.PL: Fiddled with dependencies. Incremented version number. | ||
|
||
2008-03-08 Dave Cross <dave@dave.org.uk> | ||
|
||
* MANIFEST: Added Build.PL and META.yml | ||
|
||
* lib/Number/Fraction.pm: Changed email address and copyright date | ||
|
||
* Build.PL, Makefile.PL: Moved from Makefile.PL to Build.PL. | ||
|
||
* lib/Number/Fraction.pm: Use svn revision number. Remove old cvs logs. | ||
|
||
* MANIFEST: Make non-executable | ||
|
||
* t/01_load.t, t/02_create.t, t/03_create.t, t/04_add.t, t/05_subtract.t, | ||
t/06_multiply.t, t/07_divide.t, t/08_compare.t, t/09_neg.t: Switch to using | ||
Test::More throughout. Remove old Test.pm black magic comments. | ||
|
||
* : Make non-executable | ||
|
||
2006-03-02 Dave Cross <dave@dave.org.uk> | ||
|
||
* t/05_subtract.t: fixed one test that failed after applying previous fixes. | ||
|
||
* lib/Number/Fraction.pm, t/02_create.t: A couple of patches supplied by | ||
David Westbrook. | ||
|
||
2005-10-22 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm: Added new tests. | ||
|
||
* MANIFEST: Added pod coverage tests. | ||
|
||
* t/11_pod_coverage.t: Added Pod coverage tests. | ||
|
||
2004-10-23 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm: Improved test coverage (to 100% - Go Me!) | ||
|
||
2004-05-23 Dave Cross <dave@dave.org.uk> | ||
|
||
* Makefile.PL, lib/Number/Fraction.pm, t/10_pod.t: Changed pod tests. Updated | ||
my email address in Makefile.PL | ||
|
||
* Makefile.PL: Changed references to Fraction.pm | ||
|
||
* MANIFEST: Added t/10_pod.t | ||
|
||
* MANIFEST: Moved Fraction.pm to lib/Number | ||
|
||
* Changes: Removed Changes (now autogenerated) | ||
|
||
2004-05-22 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm, t/02_create.t, t/03_create.t, t/04_add.t, | ||
t/05_subtract.t, t/06_multiply.t, t/07_divide.t, t/10_pod.t: Added more | ||
tests. Fixed a couple of bugs that they uncovered. | ||
|
||
2004-04-28 Dave Cross <dave@dave.org.uk> | ||
|
||
* MANIFEST, lib/Number/Fraction.pm: Added negative tests to MANIFEST | ||
|
||
2004-04-27 Dave Cross <dave@dave.org.uk> | ||
|
||
* lib/Number/Fraction.pm: Added support for negative numbers. | ||
|
||
* t/09_neg.t: Added tests for negative numbers | ||
|
||
2003-02-19 Dave Cross <dave@dave.org.uk> | ||
|
||
* t/08_compare.t: Corrected invalid string tests. '1/2' lt '1/4' (when | ||
considered as strings) | ||
|
||
* lib/Number/Fraction.pm: Correct '+0' to '0+'. Added "fallback" - which | ||
allowed me to remove cmp and ncmp. | ||
|
||
* Changes, MANIFEST, Makefile.PL, README, lib/Number/Fraction.pm, | ||
t/01_load.t, t/02_create.t, t/03_create.t, t/04_add.t, t/05_subtract.t, | ||
t/06_multiply.t, t/07_divide.t, t/08_compare.t: Initial revision |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use Test::More 'no_plan'; | ||
use Number::Fraction; | ||
|
||
my $f = eval { Number::Fraction->new('1/0') }; | ||
ok($@, "Denominator of zero should not allowed in string" ); | ||
|
||
$f = eval { Number::Fraction->new(1 , 0 ) }; | ||
ok($@, "Denominator of zero should not allowed in two ints" ); | ||
|
||
my $zero = Number::Fraction->new (0); | ||
cmp_ok($zero, '==', 0, "created a \'zero\' fraction"); | ||
|
||
my $qrtr = Number::Fraction->new('1/4'); | ||
cmp_ok($qrtr, '==', 0.25, "Created 1/4"); | ||
|
||
my $divz = eval { $qrtr / $zero }; | ||
ok($@, "Division by zero should cause FATAL ERROR"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use Test::More 'no_plan'; | ||
use Number::Fraction ':constants'; | ||
|
||
my $fract = undef; | ||
|
||
$fract = eval { Number::Fraction->new(3.0 , 4) }; | ||
cmp_ok($fract, 'eq' , '3/4', "fraction from round decimal numinator as number"); | ||
|
||
$fract = eval {Number::Fraction->new(3 , 4.0) }; | ||
cmp_ok($fract, 'eq' , '3/4', "fraction from round decimal denominator as number"); | ||
|
||
$fract = eval {Number::Fraction->new('3', '4' ) }; | ||
ok($@, "fraction from two healty strings not supported, use numbers instead"); | ||
|
||
$fract = eval {Number::Fraction->new('3.0', '4' ) }; | ||
ok($@, "fraction from round decimal numinator as string not supported"); | ||
|
||
$fract = eval {Number::Fraction->new('3' , '4.0') }; | ||
ok($@, "fraction from round decimal denominator as string not supported"); | ||
|
||
$fract = eval {Number::Fraction->new(3.5, 4 ) }; | ||
ok($@, "Numinator can\'t be a decimal"); | ||
|
||
$fract = eval {Number::Fraction->new(3 , 4.5) }; | ||
ok($@, "Denominator can\'t be a decimal"); | ||
|