summaryrefslogtreecommitdiff
path: root/test/src/NormalizeCaseInsensitiveStringTests.cpp
blob: f68d344f8160e4fc3efa473f7b94603527e4deb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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")
    );
}