diff options
author | Jack Lloyd <[email protected]> | 2016-12-19 00:32:51 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-19 00:32:51 -0500 |
commit | 4b1a1fd5ec72df31bc43c5d82311a316c60d61f6 (patch) | |
tree | 3faf085ba5270f92d1d50b09e5fd642f9041b035 /src/tests/test_utils.cpp | |
parent | abac6ab59b363c2ac571d13496a70d98e04a5c2f (diff) |
Minor refactoring of Text_Based_Test
Turns out astyle has some bugs wrt C++11 initialize lists. Rather
than having astyle mangle all of the tests, convert to using a string
which is split once at the start instead of a vector of keys.
Diffstat (limited to 'src/tests/test_utils.cpp')
-rw-r--r-- | src/tests/test_utils.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/tests/test_utils.cpp b/src/tests/test_utils.cpp index 6edd7fd81..d4d8bc0da 100644 --- a/src/tests/test_utils.cpp +++ b/src/tests/test_utils.cpp @@ -23,8 +23,7 @@ namespace { class Utility_Function_Tests : public Text_Based_Test { public: - Utility_Function_Tests() : Text_Based_Test("util.vec", - {"In1","In2","Out"}) + Utility_Function_Tests() : Text_Based_Test("util.vec","In1,In2,Out") {} Test::Result run_one_test(const std::string& algo, const VarMap& vars) override @@ -179,8 +178,7 @@ BOTAN_REGISTER_TEST("util", Utility_Function_Tests); class Date_Format_Tests : public Text_Based_Test { public: - Date_Format_Tests() : Text_Based_Test("dates.vec", - std::vector<std::string>{"Date"}) + Date_Format_Tests() : Text_Based_Test("dates.vec", "Date") {} std::vector<uint32_t> parse_date(const std::string& s) @@ -250,10 +248,7 @@ BOTAN_REGISTER_TEST("util_dates", Date_Format_Tests); class Base64_Tests : public Text_Based_Test { public: - Base64_Tests() : Text_Based_Test("base64.vec", - std::vector<std::string>({"Base64"}), - {"Binary"}) - {} + Base64_Tests() : Text_Based_Test("base64.vec", "Base64", "Binary") {} Test::Result run_one_test(const std::string& type, const VarMap& vars) override { @@ -331,8 +326,7 @@ BOTAN_REGISTER_TEST("base64", Base64_Tests); class Charset_Tests : public Text_Based_Test { public: - Charset_Tests() : Text_Based_Test("charset.vec", - { "In","Out" }) + Charset_Tests() : Text_Based_Test("charset.vec", "In,Out") {} Test::Result run_one_test(const std::string& type, const VarMap& vars) override |