Skip to content

Commit

Permalink
backport lower case unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeck88 committed Jun 7, 2014
1 parent 729bea8 commit bb5aaf2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/tests/test_serialization.cpp
Expand Up @@ -19,6 +19,8 @@
#include "serialization/string_utils.hpp"
#include <boost/test/auto_unit_test.hpp>

BOOST_AUTO_TEST_SUITE ( test_serialization_utils_and_unicode )

BOOST_AUTO_TEST_CASE( utils_join_test )
{
std::vector<std::string> fruit;
Expand All @@ -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";
Expand Down Expand Up @@ -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()

0 comments on commit bb5aaf2

Please sign in to comment.