diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-05-18 22:51:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-05-18 22:53:01 +0300 |
commit | 40de3bee0278d6584561a827123bc342934adccb (patch) | |
tree | 460ba68f29ec25377ef1971989c4c46e507ea3da /src/utils/parameters_unittest.cc | |
parent | dffd0a4a8e99196ad27f8fde2430b09dd29cac57 (diff) | |
download | plus-40de3bee0278d6584561a827123bc342934adccb.tar.gz plus-40de3bee0278d6584561a827123bc342934adccb.tar.bz2 plus-40de3bee0278d6584561a827123bc342934adccb.tar.xz plus-40de3bee0278d6584561a827123bc342934adccb.zip |
Add support for additional unit test library doctest.
Diffstat (limited to 'src/utils/parameters_unittest.cc')
-rw-r--r-- | src/utils/parameters_unittest.cc | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/utils/parameters_unittest.cc b/src/utils/parameters_unittest.cc index 6030c394e..192249a12 100644 --- a/src/utils/parameters_unittest.cc +++ b/src/utils/parameters_unittest.cc @@ -24,14 +24,14 @@ #include "debug.h" -TEST_CASE("parameters basic 1") +TEST_CASE("parameters basic 1", "") { StringVect pars; REQUIRE(splitParameters(pars, "", ",", '\"') == true); REQUIRE(pars.size() == 0); } -TEST_CASE("parameters basic 2") +TEST_CASE("parameters basic 2", "") { StringVect pars; REQUIRE(splitParameters(pars, "one,two, tree", ",", '\"') == true); @@ -41,14 +41,14 @@ TEST_CASE("parameters basic 2") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters basic 3") +TEST_CASE("parameters basic 3", "") { StringVect pars; REQUIRE(splitParameters(pars, ", ,,,", ",", '\"') == true); REQUIRE(pars.size() == 0); } -TEST_CASE("parameters basic 4") +TEST_CASE("parameters basic 4", "") { StringVect pars; REQUIRE(splitParameters(pars, "one,,two, tree", ",", '\"') == true); @@ -58,7 +58,7 @@ TEST_CASE("parameters basic 4") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters escape 1") +TEST_CASE("parameters escape 1", "") { StringVect pars; REQUIRE(splitParameters(pars, "\\\"", ",", '\"') == true); @@ -66,7 +66,7 @@ TEST_CASE("parameters escape 1") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters escape 2") +TEST_CASE("parameters escape 2", "") { StringVect pars; REQUIRE(splitParameters(pars, "\\\", test", ",", '\"') == true); @@ -75,7 +75,7 @@ TEST_CASE("parameters escape 2") REQUIRE(pars[1] == "test"); } -TEST_CASE("parameters escape 3") +TEST_CASE("parameters escape 3", "") { StringVect pars; REQUIRE(splitParameters(pars, "test,\\\"", ",", '\"') == true); @@ -84,7 +84,7 @@ TEST_CASE("parameters escape 3") REQUIRE(pars[1] == "\""); } -TEST_CASE("parameters quote 1") +TEST_CASE("parameters quote 1", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one\",,two, tree", ",", '\"') == true); @@ -94,7 +94,7 @@ TEST_CASE("parameters quote 1") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 2") +TEST_CASE("parameters quote 2", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\",,two, tree", ",", '\"') == true); @@ -104,7 +104,7 @@ TEST_CASE("parameters quote 2") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 3") +TEST_CASE("parameters quote 3", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one test\",,two, tree", ",", '\"') == @@ -115,7 +115,7 @@ TEST_CASE("parameters quote 3") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 4") +TEST_CASE("parameters quote 4", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\\\"one test\\\"\",,two, tree", ",", '\"') @@ -126,7 +126,7 @@ TEST_CASE("parameters quote 4") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 5") +TEST_CASE("parameters quote 5", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\\\"one \\\"test\\\"\",,two, tree", @@ -137,7 +137,7 @@ TEST_CASE("parameters quote 5") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 6") +TEST_CASE("parameters quote 6", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one, test\",,two, tree", ",", '\"') @@ -148,7 +148,7 @@ TEST_CASE("parameters quote 6") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 7") +TEST_CASE("parameters quote 7", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\\\"one, test\\\"\",,two, tree", @@ -159,7 +159,7 @@ TEST_CASE("parameters quote 7") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 8") +TEST_CASE("parameters quote 8", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\\\"\",,two, tree", ",", '\"') @@ -170,7 +170,7 @@ TEST_CASE("parameters quote 8") REQUIRE(pars[2] == "tree"); } -TEST_CASE("parameters quote 9") +TEST_CASE("parameters quote 9", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"\\\",,two, tree", ",", '\"') @@ -179,7 +179,7 @@ TEST_CASE("parameters quote 9") REQUIRE(pars[0] == "\"\",,two, tree"); } -TEST_CASE("parameters quote 10") +TEST_CASE("parameters quote 10", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"", ",", '\"') @@ -188,7 +188,7 @@ TEST_CASE("parameters quote 10") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters quote 11") +TEST_CASE("parameters quote 11", "") { StringVect pars; REQUIRE(splitParameters(pars, "\\\"", ",", '\"') @@ -197,7 +197,7 @@ TEST_CASE("parameters quote 11") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters quote 12") +TEST_CASE("parameters quote 12", "") { StringVect pars; REQUIRE(splitParameters(pars, ",\"", ",", '\"') @@ -206,7 +206,7 @@ TEST_CASE("parameters quote 12") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters quote 13") +TEST_CASE("parameters quote 13", "") { StringVect pars; REQUIRE(splitParameters(pars, "\",", ",", '\"') @@ -215,7 +215,7 @@ TEST_CASE("parameters quote 13") REQUIRE(pars[0] == "\","); } -TEST_CASE("parameters quote 14") +TEST_CASE("parameters quote 14", "") { StringVect pars; REQUIRE(splitParameters(pars, "\\\",", ",", '\"') @@ -224,7 +224,7 @@ TEST_CASE("parameters quote 14") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters quote 15") +TEST_CASE("parameters quote 15", "") { StringVect pars; REQUIRE(splitParameters(pars, ",\\\"", ",", '\"') @@ -233,7 +233,7 @@ TEST_CASE("parameters quote 15") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters quote 16") +TEST_CASE("parameters quote 16", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one test\"", ",", '\"') == @@ -242,7 +242,7 @@ TEST_CASE("parameters quote 16") REQUIRE(pars[0] == "one test"); } -TEST_CASE("parameters quote 17") +TEST_CASE("parameters quote 17", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one, test\"", ",", '\"') == @@ -251,7 +251,7 @@ TEST_CASE("parameters quote 17") REQUIRE(pars[0] == "one, test"); } -TEST_CASE("parameters quote 18") +TEST_CASE("parameters quote 18", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one\\\" test\"", ",", '\"') == @@ -260,7 +260,7 @@ TEST_CASE("parameters quote 18") REQUIRE(pars[0] == "one\" test"); } -TEST_CASE("parameters quote 19") +TEST_CASE("parameters quote 19", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one\\\" ,test\"", ",", '\"') == @@ -269,7 +269,7 @@ TEST_CASE("parameters quote 19") REQUIRE(pars[0] == "one\" ,test"); } -TEST_CASE("parameters quote 20") +TEST_CASE("parameters quote 20", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"one\\\" test,\"", ",", '\"') == @@ -278,7 +278,7 @@ TEST_CASE("parameters quote 20") REQUIRE(pars[0] == "one\" test,"); } -TEST_CASE("parameters complex 1") +TEST_CASE("parameters complex 1", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"test\" \"line\"", ",", '\"') == true); @@ -286,7 +286,7 @@ TEST_CASE("parameters complex 1") REQUIRE(pars[0] == "test\" \"line"); } -TEST_CASE("parameters complex 2") +TEST_CASE("parameters complex 2", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"test\", \"line\"", ",", '\"') == true); @@ -295,7 +295,7 @@ TEST_CASE("parameters complex 2") REQUIRE(pars[1] == "line"); } -TEST_CASE("parameters complex 3") +TEST_CASE("parameters complex 3", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"test,\" \"line\"", ",", '\"') == true); @@ -303,7 +303,7 @@ TEST_CASE("parameters complex 3") REQUIRE(pars[0] == "test,\" \"line"); } -TEST_CASE("parameters broken 1") +TEST_CASE("parameters broken 1", "") { StringVect pars; REQUIRE(splitParameters(pars, "\"", ",", '\"') == true); @@ -311,14 +311,14 @@ TEST_CASE("parameters broken 1") REQUIRE(pars[0] == "\""); } -TEST_CASE("parameters broken 2") +TEST_CASE("parameters broken 2", "") { StringVect pars; REQUIRE(splitParameters(pars, ",", ",", '\"') == true); REQUIRE(pars.size() == 0); } -TEST_CASE("parameters broken 3") +TEST_CASE("parameters broken 3", "") { StringVect pars; REQUIRE(splitParameters(pars, |