summaryrefslogtreecommitdiff
path: root/datatest.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-12-07 12:25:52 -0500
committerJeffrey Walton <noloader@gmail.com>2018-12-07 12:25:52 -0500
commit1c88fd6f59564f4933fd3d897503a5492feb726c (patch)
tree6a8be7f9450da1d651330e58a0eca5caa1791ac7 /datatest.cpp
parent52035583de5c9e41a29899256857a0ff18818664 (diff)
downloadcryptopp-git-1c88fd6f59564f4933fd3d897503a5492feb726c.tar.gz
Add search for test vectors and test data (GH #760)
Diffstat (limited to 'datatest.cpp')
-rw-r--r--datatest.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/datatest.cpp b/datatest.cpp
index 4d0d7988..6a15ecb2 100644
--- a/datatest.cpp
+++ b/datatest.cpp
@@ -913,13 +913,7 @@ void OutputNameValuePairs(const NameValuePairs &v)
void TestDataFile(std::string filename, const NameValuePairs &overrideParameters, unsigned int &totalTests, unsigned int &failedTests)
{
- static const std::string dataDirectory(CRYPTOPP_DATA_DIR);
- if (!dataDirectory.empty())
- {
- if(dataDirectory != filename.substr(0, dataDirectory.length()))
- filename.insert(0, dataDirectory);
- }
-
+ filename = DataDir(filename);
std::ifstream file(filename.c_str());
if (!file.good())
throw Exception(Exception::OTHER_ERROR, "Can not open file " + filename + " for reading");