From bb5aaf208193247f902f220feb4065d4f93f1f95 Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Sat, 7 Jun 2014 17:58:24 -0400 Subject: [PATCH] backport lower case unit tests --- src/tests/test_serialization.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/tests/test_serialization.cpp b/src/tests/test_serialization.cpp index cb030f2b0d0b..4ca2a6bca8a4 100644 --- a/src/tests/test_serialization.cpp +++ b/src/tests/test_serialization.cpp @@ -19,6 +19,8 @@ #include "serialization/string_utils.hpp" #include +BOOST_AUTO_TEST_SUITE ( test_serialization_utils_and_unicode ) + BOOST_AUTO_TEST_CASE( utils_join_test ) { std::vector fruit; @@ -43,6 +45,14 @@ BOOST_AUTO_TEST_CASE( utils_join_test ) BOOST_CHECK( utils::u8truncate(unicode,3) == "\xC3\xBCni"); // "üni" } +BOOST_AUTO_TEST_CASE( test_lowercase ) +{ + BOOST_CHECK_EQUAL ( utils::lowercase("FOO") , "foo" ); + BOOST_CHECK_EQUAL ( utils::lowercase("foo") , "foo" ); + BOOST_CHECK_EQUAL ( utils::lowercase("FoO") , "foo" ); + BOOST_CHECK_EQUAL ( utils::lowercase("fO0") , "fo0" ); +} + BOOST_AUTO_TEST_CASE( test_wildcard_string_match ) { const std::string str = "foo bar baz"; @@ -76,3 +86,5 @@ BOOST_AUTO_TEST_CASE( test_wildcard_string_match ) BOOST_CHECK(!utils::wildcard_string_match("", "?")); BOOST_CHECK(!utils::wildcard_string_match("", "???")); } + +BOOST_AUTO_TEST_SUITE_END()