diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2018-07-04 00:02:10 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2018-07-04 00:02:10 -0700 |
commit | 82ffd3e718771d2bc635264c03f002372b34893a (patch) | |
tree | 043acbca682a0634e104b0b8fc015f49ede57634 /test/src/NormalizeCaseInsensitiveStringTests.cpp | |
parent | e1ba9b2e46f0d67b5b3483e28750e4a3c86d1c39 (diff) |
Refactoring
Add unit tests for stand-alone modules that were formerly
part of Uri and so were previously tested along with Uri.
Diffstat (limited to 'test/src/NormalizeCaseInsensitiveStringTests.cpp')
-rw-r--r-- | test/src/NormalizeCaseInsensitiveStringTests.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/src/NormalizeCaseInsensitiveStringTests.cpp b/test/src/NormalizeCaseInsensitiveStringTests.cpp new file mode 100644 index 0000000..f68d344 --- /dev/null +++ b/test/src/NormalizeCaseInsensitiveStringTests.cpp @@ -0,0 +1,41 @@ +/** + * @file NormalizeCaseInsensitiveStringTests.cpp + * + * This module contains the unit tests of the Uri::NormalizeCaseInsensitiveString class. + * + * © 2018 by Richard Walters + */ + +#include <gtest/gtest.h> +#include <src/NormalizeCaseInsensitiveString.hpp> + +TEST(NormalizeCaseInsensitiveStringTests, NormalizeCaseInsensitiveString) { + ASSERT_EQ( + "example", + Uri::NormalizeCaseInsensitiveString("eXAmplE") + ); + ASSERT_EQ( + "example", + Uri::NormalizeCaseInsensitiveString("example") + ); + ASSERT_EQ( + "example", + Uri::NormalizeCaseInsensitiveString("EXAMPLE") + ); + ASSERT_EQ( + "foo1bar", + Uri::NormalizeCaseInsensitiveString("foo1BAR") + ); + ASSERT_EQ( + "foo1bar", + Uri::NormalizeCaseInsensitiveString("fOo1bAr") + ); + ASSERT_EQ( + "foo1bar", + Uri::NormalizeCaseInsensitiveString("foo1bar") + ); + ASSERT_EQ( + "foo1bar", + Uri::NormalizeCaseInsensitiveString("FOO1BAR") + ); +} |