aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-06 15:24:01 +0000
committerlloyd <[email protected]>2014-01-06 15:24:01 +0000
commit1f73f5f5270f16c9c6cc739d7bfcd7c9002cd340 (patch)
treee71d84fbb3c28ee996924521b9efa0c02bc6b9f3 /src/tests
parentca29b89bce2c555b033825e0cd304e7ce24e8ab2 (diff)
Move previously common function to only remaining caller's source
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_bigint.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/tests/test_bigint.cpp b/src/tests/test_bigint.cpp
index 2c1b257b9..c19b6cc23 100644
--- a/src/tests/test_bigint.cpp
+++ b/src/tests/test_bigint.cpp
@@ -22,6 +22,24 @@ using namespace Botan;
namespace {
+std::vector<std::string> parse(const std::string& line)
+ {
+ const char DELIMITER = ':';
+ std::vector<std::string> substr;
+ std::string::size_type start = 0, end = line.find(DELIMITER);
+ while(end != std::string::npos)
+ {
+ substr.push_back(line.substr(start, end-start));
+ start = end+1;
+ end = line.find(DELIMITER, start);
+ }
+ if(line.size() > start)
+ substr.push_back(line.substr(start));
+ while(substr.size() <= 4) // at least 5 substr, some possibly empty
+ substr.push_back("");
+ return substr;
+ }
+
size_t test_make_prime()
{
AutoSeeded_RNG rng;