|
Boost-Commit : |
From: arseny.kapoulkine_at_[hidden]
Date: 2007-08-19 14:26:39
Author: zeux
Date: 2007-08-19 14:26:39 EDT (Sun, 19 Aug 2007)
New Revision: 38766
URL: http://svn.boost.org/trac/boost/changeset/38766
Log:
Small tests improvements
Text files modified:
sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp | 3 ++-
sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/arithmetics.cpp 2007-08-19 14:26:39 EDT (Sun, 19 Aug 2007)
@@ -291,7 +291,8 @@
{"-442302464", '>', "15", "-13498"},
{"-3474347253302854482051203072", '>', "65", "-94172371"},
{"-33", '>', "4", "-3"},
- {"-23894283948234823948324123", '>', "71", "-10120"}
+ {"-23894283948234823948324123", '>', "71", "-10120"},
+ {"-23894283948234823948324123", '>', "64", "-1295312"}
};
for (size_t i = 0; i < ARRAY_SIZE(entries); ++i)
Modified: sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp
==============================================================================
--- sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp (original)
+++ sandbox/SOC/2007/bigint/libs/bigint/test/string_conversion.cpp 2007-08-19 14:26:39 EDT (Sun, 19 Aug 2007)
@@ -90,7 +90,13 @@
{-36, "sa3mx\xa3\xb3", 47500521, 0},
// check full alphabet
- {36, "abcdefghijklmnopqrstuvwxyz1234567890", 0, "30483235087530204251026473460499750369628113087340027780"}
+ {36, "abcdefghijklmnopqrstuvwxyz1234567890", 0, "30483235087530204251026473460499750369628113087340027780"},
+
+ // out-of-range bases produce 0 as conversion result
+ {1, "0", 0, 0},
+ {37, "0", 0, 0},
+ {0, "0", 0, 0},
+ {38491, "0", 0, 0}
};
for (size_t i = 0; i < ARRAY_SIZE(entries); ++i)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk