diff options
author | lloyd <[email protected]> | 2014-01-06 15:24:01 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-06 15:24:01 +0000 |
commit | 1f73f5f5270f16c9c6cc739d7bfcd7c9002cd340 (patch) | |
tree | e71d84fbb3c28ee996924521b9efa0c02bc6b9f3 /src/tests | |
parent | ca29b89bce2c555b033825e0cd304e7ce24e8ab2 (diff) |
Move previously common function to only remaining caller's source
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/test_bigint.cpp | 18 |
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; |