Matt McCutchen's Web Site
/
bigint
/
bigint.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BigUnsignedInABase(std::string): Reject digits too big for the base.
[bigint/bigint.git]
/
testsuite.cc
diff --git
a/testsuite.cc
b/testsuite.cc
index
7817e9a
..
7cb9768
100644
(file)
--- a/
testsuite.cc
+++ b/
testsuite.cc
@@
-311,6
+311,13
@@
TEST(p2); //-15
TEST(check(num)); //25
}
TEST(check(num)); //25
}
+{
+ /* Test that BigUnsignedInABase(std::string) constructor rejects digits
+ * too big for the specified base.
+ * Bug reported by Niakam Kazemi. */
+ TEST(BigUnsignedInABase("f", 10)); //error
+}
+
} catch (const char *err) {
cout << "UNCAUGHT ERROR: " << err << endl;
}
} catch (const char *err) {
cout << "UNCAUGHT ERROR: " << err << endl;
}