text:
// Warning! This file is autogenerated.
#include <boost/text/normalize_string.hpp>
#include <boost/text/utility.hpp>
#include <boost/text/string_utility.hpp>

#include <gtest/gtest.h>

#include <algorithm>

TEST(normalization, nfkd_033_000)
{
    // BC58;BC58;1107 1163 11B3;BC58;1107 1163 11B3;
    // (뱘; 뱘; 뱘; 뱘; 뱘; ) HANGUL SYLLABLE BYALS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC58 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC58 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC58 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_001)
{
    // BC59;BC59;1107 1163 11B4;BC59;1107 1163 11B4;
    // (뱙; 뱙; 뱙; 뱙; 뱙; ) HANGUL SYLLABLE BYALT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC59 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC59 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC59 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_002)
{
    // BC5A;BC5A;1107 1163 11B5;BC5A;1107 1163 11B5;
    // (뱚; 뱚; 뱚; 뱚; 뱚; ) HANGUL SYLLABLE BYALP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_003)
{
    // BC5B;BC5B;1107 1163 11B6;BC5B;1107 1163 11B6;
    // (뱛; 뱛; 뱛; 뱛; 뱛; ) HANGUL SYLLABLE BYALH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_004)
{
    // BC5C;BC5C;1107 1163 11B7;BC5C;1107 1163 11B7;
    // (뱜; 뱜; 뱜; 뱜; 뱜; ) HANGUL SYLLABLE BYAM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_005)
{
    // BC5D;BC5D;1107 1163 11B8;BC5D;1107 1163 11B8;
    // (뱝; 뱝; 뱝; 뱝; 뱝; ) HANGUL SYLLABLE BYAB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_006)
{
    // BC5E;BC5E;1107 1163 11B9;BC5E;1107 1163 11B9;
    // (뱞; 뱞; 뱞; 뱞; 뱞; ) HANGUL SYLLABLE BYABS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_007)
{
    // BC5F;BC5F;1107 1163 11BA;BC5F;1107 1163 11BA;
    // (뱟; 뱟; 뱟; 뱟; 뱟; ) HANGUL SYLLABLE BYAS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC5F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC5F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC5F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_008)
{
    // BC60;BC60;1107 1163 11BB;BC60;1107 1163 11BB;
    // (뱠; 뱠; 뱠; 뱠; 뱠; ) HANGUL SYLLABLE BYASS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC60 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC60 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC60 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_009)
{
    // BC61;BC61;1107 1163 11BC;BC61;1107 1163 11BC;
    // (뱡; 뱡; 뱡; 뱡; 뱡; ) HANGUL SYLLABLE BYANG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC61 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC61 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC61 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_010)
{
    // BC62;BC62;1107 1163 11BD;BC62;1107 1163 11BD;
    // (뱢; 뱢; 뱢; 뱢; 뱢; ) HANGUL SYLLABLE BYAJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC62 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC62 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC62 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_011)
{
    // BC63;BC63;1107 1163 11BE;BC63;1107 1163 11BE;
    // (뱣; 뱣; 뱣; 뱣; 뱣; ) HANGUL SYLLABLE BYAC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC63 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC63 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC63 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_012)
{
    // BC64;BC64;1107 1163 11BF;BC64;1107 1163 11BF;
    // (뱤; 뱤; 뱤; 뱤; 뱤; ) HANGUL SYLLABLE BYAK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC64 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC64 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC64 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_013)
{
    // BC65;BC65;1107 1163 11C0;BC65;1107 1163 11C0;
    // (뱥; 뱥; 뱥; 뱥; 뱥; ) HANGUL SYLLABLE BYAT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC65 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC65 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC65 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_014)
{
    // BC66;BC66;1107 1163 11C1;BC66;1107 1163 11C1;
    // (뱦; 뱦; 뱦; 뱦; 뱦; ) HANGUL SYLLABLE BYAP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC66 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC66 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC66 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_015)
{
    // BC67;BC67;1107 1163 11C2;BC67;1107 1163 11C2;
    // (뱧; 뱧; 뱧; 뱧; 뱧; ) HANGUL SYLLABLE BYAH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC67 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC67 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1163, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC67 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1163, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_016)
{
    // BC68;BC68;1107 1164;BC68;1107 1164;
    // (뱨; 뱨; 뱨; 뱨; 뱨; ) HANGUL SYLLABLE BYAE
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC68 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC68 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1164 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC68 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1164 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_017)
{
    // BC69;BC69;1107 1164 11A8;BC69;1107 1164 11A8;
    // (뱩; 뱩; 뱩; 뱩; 뱩; ) HANGUL SYLLABLE BYAEG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC69 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC69 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC69 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_018)
{
    // BC6A;BC6A;1107 1164 11A9;BC6A;1107 1164 11A9;
    // (뱪; 뱪; 뱪; 뱪; 뱪; ) HANGUL SYLLABLE BYAEGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_019)
{
    // BC6B;BC6B;1107 1164 11AA;BC6B;1107 1164 11AA;
    // (뱫; 뱫; 뱫; 뱫; 뱫; ) HANGUL SYLLABLE BYAEGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_020)
{
    // BC6C;BC6C;1107 1164 11AB;BC6C;1107 1164 11AB;
    // (뱬; 뱬; 뱬; 뱬; 뱬; ) HANGUL SYLLABLE BYAEN
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_021)
{
    // BC6D;BC6D;1107 1164 11AC;BC6D;1107 1164 11AC;
    // (뱭; 뱭; 뱭; 뱭; 뱭; ) HANGUL SYLLABLE BYAENJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_022)
{
    // BC6E;BC6E;1107 1164 11AD;BC6E;1107 1164 11AD;
    // (뱮; 뱮; 뱮; 뱮; 뱮; ) HANGUL SYLLABLE BYAENH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_023)
{
    // BC6F;BC6F;1107 1164 11AE;BC6F;1107 1164 11AE;
    // (뱯; 뱯; 뱯; 뱯; 뱯; ) HANGUL SYLLABLE BYAED
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC6F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC6F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC6F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_024)
{
    // BC70;BC70;1107 1164 11AF;BC70;1107 1164 11AF;
    // (뱰; 뱰; 뱰; 뱰; 뱰; ) HANGUL SYLLABLE BYAEL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC70 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC70 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC70 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_025)
{
    // BC71;BC71;1107 1164 11B0;BC71;1107 1164 11B0;
    // (뱱; 뱱; 뱱; 뱱; 뱱; ) HANGUL SYLLABLE BYAELG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC71 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC71 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC71 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_026)
{
    // BC72;BC72;1107 1164 11B1;BC72;1107 1164 11B1;
    // (뱲; 뱲; 뱲; 뱲; 뱲; ) HANGUL SYLLABLE BYAELM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC72 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC72 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC72 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_027)
{
    // BC73;BC73;1107 1164 11B2;BC73;1107 1164 11B2;
    // (뱳; 뱳; 뱳; 뱳; 뱳; ) HANGUL SYLLABLE BYAELB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC73 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC73 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC73 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_028)
{
    // BC74;BC74;1107 1164 11B3;BC74;1107 1164 11B3;
    // (뱴; 뱴; 뱴; 뱴; 뱴; ) HANGUL SYLLABLE BYAELS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC74 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC74 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC74 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_029)
{
    // BC75;BC75;1107 1164 11B4;BC75;1107 1164 11B4;
    // (뱵; 뱵; 뱵; 뱵; 뱵; ) HANGUL SYLLABLE BYAELT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC75 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC75 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC75 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_030)
{
    // BC76;BC76;1107 1164 11B5;BC76;1107 1164 11B5;
    // (뱶; 뱶; 뱶; 뱶; 뱶; ) HANGUL SYLLABLE BYAELP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC76 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC76 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC76 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_031)
{
    // BC77;BC77;1107 1164 11B6;BC77;1107 1164 11B6;
    // (뱷; 뱷; 뱷; 뱷; 뱷; ) HANGUL SYLLABLE BYAELH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC77 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC77 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC77 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_032)
{
    // BC78;BC78;1107 1164 11B7;BC78;1107 1164 11B7;
    // (뱸; 뱸; 뱸; 뱸; 뱸; ) HANGUL SYLLABLE BYAEM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC78 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC78 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC78 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_033)
{
    // BC79;BC79;1107 1164 11B8;BC79;1107 1164 11B8;
    // (뱹; 뱹; 뱹; 뱹; 뱹; ) HANGUL SYLLABLE BYAEB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC79 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC79 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC79 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_034)
{
    // BC7A;BC7A;1107 1164 11B9;BC7A;1107 1164 11B9;
    // (뱺; 뱺; 뱺; 뱺; 뱺; ) HANGUL SYLLABLE BYAEBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_035)
{
    // BC7B;BC7B;1107 1164 11BA;BC7B;1107 1164 11BA;
    // (뱻; 뱻; 뱻; 뱻; 뱻; ) HANGUL SYLLABLE BYAES
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_036)
{
    // BC7C;BC7C;1107 1164 11BB;BC7C;1107 1164 11BB;
    // (뱼; 뱼; 뱼; 뱼; 뱼; ) HANGUL SYLLABLE BYAESS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_037)
{
    // BC7D;BC7D;1107 1164 11BC;BC7D;1107 1164 11BC;
    // (뱽; 뱽; 뱽; 뱽; 뱽; ) HANGUL SYLLABLE BYAENG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_038)
{
    // BC7E;BC7E;1107 1164 11BD;BC7E;1107 1164 11BD;
    // (뱾; 뱾; 뱾; 뱾; 뱾; ) HANGUL SYLLABLE BYAEJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_039)
{
    // BC7F;BC7F;1107 1164 11BE;BC7F;1107 1164 11BE;
    // (뱿; 뱿; 뱿; 뱿; 뱿; ) HANGUL SYLLABLE BYAEC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC7F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC7F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC7F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_040)
{
    // BC80;BC80;1107 1164 11BF;BC80;1107 1164 11BF;
    // (벀; 벀; 벀; 벀; 벀; ) HANGUL SYLLABLE BYAEK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC80 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC80 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC80 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_041)
{
    // BC81;BC81;1107 1164 11C0;BC81;1107 1164 11C0;
    // (벁; 벁; 벁; 벁; 벁; ) HANGUL SYLLABLE BYAET
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC81 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC81 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC81 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_042)
{
    // BC82;BC82;1107 1164 11C1;BC82;1107 1164 11C1;
    // (벂; 벂; 벂; 벂; 벂; ) HANGUL SYLLABLE BYAEP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC82 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC82 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC82 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_043)
{
    // BC83;BC83;1107 1164 11C2;BC83;1107 1164 11C2;
    // (벃; 벃; 벃; 벃; 벃; ) HANGUL SYLLABLE BYAEH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC83 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC83 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1164, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC83 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1164, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_044)
{
    // BC84;BC84;1107 1165;BC84;1107 1165;
    // (버; 버; 버; 버; 버; ) HANGUL SYLLABLE BEO
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC84 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC84 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1165 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC84 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1165 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_045)
{
    // BC85;BC85;1107 1165 11A8;BC85;1107 1165 11A8;
    // (벅; 벅; 벅; 벅; 벅; ) HANGUL SYLLABLE BEOG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC85 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC85 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC85 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_046)
{
    // BC86;BC86;1107 1165 11A9;BC86;1107 1165 11A9;
    // (벆; 벆; 벆; 벆; 벆; ) HANGUL SYLLABLE BEOGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC86 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC86 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC86 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_047)
{
    // BC87;BC87;1107 1165 11AA;BC87;1107 1165 11AA;
    // (벇; 벇; 벇; 벇; 벇; ) HANGUL SYLLABLE BEOGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC87 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC87 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC87 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_048)
{
    // BC88;BC88;1107 1165 11AB;BC88;1107 1165 11AB;
    // (번; 번; 번; 번; 번; ) HANGUL SYLLABLE BEON
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC88 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC88 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC88 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_049)
{
    // BC89;BC89;1107 1165 11AC;BC89;1107 1165 11AC;
    // (벉; 벉; 벉; 벉; 벉; ) HANGUL SYLLABLE BEONJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC89 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC89 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC89 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_050)
{
    // BC8A;BC8A;1107 1165 11AD;BC8A;1107 1165 11AD;
    // (벊; 벊; 벊; 벊; 벊; ) HANGUL SYLLABLE BEONH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_051)
{
    // BC8B;BC8B;1107 1165 11AE;BC8B;1107 1165 11AE;
    // (벋; 벋; 벋; 벋; 벋; ) HANGUL SYLLABLE BEOD
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_052)
{
    // BC8C;BC8C;1107 1165 11AF;BC8C;1107 1165 11AF;
    // (벌; 벌; 벌; 벌; 벌; ) HANGUL SYLLABLE BEOL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_053)
{
    // BC8D;BC8D;1107 1165 11B0;BC8D;1107 1165 11B0;
    // (벍; 벍; 벍; 벍; 벍; ) HANGUL SYLLABLE BEOLG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_054)
{
    // BC8E;BC8E;1107 1165 11B1;BC8E;1107 1165 11B1;
    // (벎; 벎; 벎; 벎; 벎; ) HANGUL SYLLABLE BEOLM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_055)
{
    // BC8F;BC8F;1107 1165 11B2;BC8F;1107 1165 11B2;
    // (벏; 벏; 벏; 벏; 벏; ) HANGUL SYLLABLE BEOLB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC8F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC8F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC8F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_056)
{
    // BC90;BC90;1107 1165 11B3;BC90;1107 1165 11B3;
    // (벐; 벐; 벐; 벐; 벐; ) HANGUL SYLLABLE BEOLS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC90 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC90 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC90 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_057)
{
    // BC91;BC91;1107 1165 11B4;BC91;1107 1165 11B4;
    // (벑; 벑; 벑; 벑; 벑; ) HANGUL SYLLABLE BEOLT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC91 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC91 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC91 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_058)
{
    // BC92;BC92;1107 1165 11B5;BC92;1107 1165 11B5;
    // (벒; 벒; 벒; 벒; 벒; ) HANGUL SYLLABLE BEOLP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC92 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC92 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC92 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_059)
{
    // BC93;BC93;1107 1165 11B6;BC93;1107 1165 11B6;
    // (벓; 벓; 벓; 벓; 벓; ) HANGUL SYLLABLE BEOLH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC93 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC93 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC93 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_060)
{
    // BC94;BC94;1107 1165 11B7;BC94;1107 1165 11B7;
    // (범; 범; 범; 범; 범; ) HANGUL SYLLABLE BEOM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC94 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC94 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC94 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_061)
{
    // BC95;BC95;1107 1165 11B8;BC95;1107 1165 11B8;
    // (법; 법; 법; 법; 법; ) HANGUL SYLLABLE BEOB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC95 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC95 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC95 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_062)
{
    // BC96;BC96;1107 1165 11B9;BC96;1107 1165 11B9;
    // (벖; 벖; 벖; 벖; 벖; ) HANGUL SYLLABLE BEOBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC96 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC96 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC96 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_063)
{
    // BC97;BC97;1107 1165 11BA;BC97;1107 1165 11BA;
    // (벗; 벗; 벗; 벗; 벗; ) HANGUL SYLLABLE BEOS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC97 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC97 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC97 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_064)
{
    // BC98;BC98;1107 1165 11BB;BC98;1107 1165 11BB;
    // (벘; 벘; 벘; 벘; 벘; ) HANGUL SYLLABLE BEOSS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC98 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC98 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC98 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_065)
{
    // BC99;BC99;1107 1165 11BC;BC99;1107 1165 11BC;
    // (벙; 벙; 벙; 벙; 벙; ) HANGUL SYLLABLE BEONG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC99 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC99 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC99 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_066)
{
    // BC9A;BC9A;1107 1165 11BD;BC9A;1107 1165 11BD;
    // (벚; 벚; 벚; 벚; 벚; ) HANGUL SYLLABLE BEOJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_067)
{
    // BC9B;BC9B;1107 1165 11BE;BC9B;1107 1165 11BE;
    // (벛; 벛; 벛; 벛; 벛; ) HANGUL SYLLABLE BEOC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_068)
{
    // BC9C;BC9C;1107 1165 11BF;BC9C;1107 1165 11BF;
    // (벜; 벜; 벜; 벜; 벜; ) HANGUL SYLLABLE BEOK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_069)
{
    // BC9D;BC9D;1107 1165 11C0;BC9D;1107 1165 11C0;
    // (벝; 벝; 벝; 벝; 벝; ) HANGUL SYLLABLE BEOT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_070)
{
    // BC9E;BC9E;1107 1165 11C1;BC9E;1107 1165 11C1;
    // (벞; 벞; 벞; 벞; 벞; ) HANGUL SYLLABLE BEOP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_071)
{
    // BC9F;BC9F;1107 1165 11C2;BC9F;1107 1165 11C2;
    // (벟; 벟; 벟; 벟; 벟; ) HANGUL SYLLABLE BEOH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBC9F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBC9F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1165, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBC9F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1165, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_072)
{
    // BCA0;BCA0;1107 1166;BCA0;1107 1166;
    // (베; 베; 베; 베; 베; ) HANGUL SYLLABLE BE
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA0 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1166 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA0 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1166 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_073)
{
    // BCA1;BCA1;1107 1166 11A8;BCA1;1107 1166 11A8;
    // (벡; 벡; 벡; 벡; 벡; ) HANGUL SYLLABLE BEG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_074)
{
    // BCA2;BCA2;1107 1166 11A9;BCA2;1107 1166 11A9;
    // (벢; 벢; 벢; 벢; 벢; ) HANGUL SYLLABLE BEGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_075)
{
    // BCA3;BCA3;1107 1166 11AA;BCA3;1107 1166 11AA;
    // (벣; 벣; 벣; 벣; 벣; ) HANGUL SYLLABLE BEGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_076)
{
    // BCA4;BCA4;1107 1166 11AB;BCA4;1107 1166 11AB;
    // (벤; 벤; 벤; 벤; 벤; ) HANGUL SYLLABLE BEN
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA4 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA4 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_077)
{
    // BCA5;BCA5;1107 1166 11AC;BCA5;1107 1166 11AC;
    // (벥; 벥; 벥; 벥; 벥; ) HANGUL SYLLABLE BENJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_078)
{
    // BCA6;BCA6;1107 1166 11AD;BCA6;1107 1166 11AD;
    // (벦; 벦; 벦; 벦; 벦; ) HANGUL SYLLABLE BENH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_079)
{
    // BCA7;BCA7;1107 1166 11AE;BCA7;1107 1166 11AE;
    // (벧; 벧; 벧; 벧; 벧; ) HANGUL SYLLABLE BED
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_080)
{
    // BCA8;BCA8;1107 1166 11AF;BCA8;1107 1166 11AF;
    // (벨; 벨; 벨; 벨; 벨; ) HANGUL SYLLABLE BEL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA8 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA8 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_081)
{
    // BCA9;BCA9;1107 1166 11B0;BCA9;1107 1166 11B0;
    // (벩; 벩; 벩; 벩; 벩; ) HANGUL SYLLABLE BELG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCA9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCA9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCA9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_082)
{
    // BCAA;BCAA;1107 1166 11B1;BCAA;1107 1166 11B1;
    // (벪; 벪; 벪; 벪; 벪; ) HANGUL SYLLABLE BELM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_083)
{
    // BCAB;BCAB;1107 1166 11B2;BCAB;1107 1166 11B2;
    // (벫; 벫; 벫; 벫; 벫; ) HANGUL SYLLABLE BELB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_084)
{
    // BCAC;BCAC;1107 1166 11B3;BCAC;1107 1166 11B3;
    // (벬; 벬; 벬; 벬; 벬; ) HANGUL SYLLABLE BELS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAC }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAC }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_085)
{
    // BCAD;BCAD;1107 1166 11B4;BCAD;1107 1166 11B4;
    // (벭; 벭; 벭; 벭; 벭; ) HANGUL SYLLABLE BELT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAD }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAD }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAD }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_086)
{
    // BCAE;BCAE;1107 1166 11B5;BCAE;1107 1166 11B5;
    // (벮; 벮; 벮; 벮; 벮; ) HANGUL SYLLABLE BELP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_087)
{
    // BCAF;BCAF;1107 1166 11B6;BCAF;1107 1166 11B6;
    // (벯; 벯; 벯; 벯; 벯; ) HANGUL SYLLABLE BELH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCAF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCAF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCAF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_088)
{
    // BCB0;BCB0;1107 1166 11B7;BCB0;1107 1166 11B7;
    // (벰; 벰; 벰; 벰; 벰; ) HANGUL SYLLABLE BEM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB0 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB0 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_089)
{
    // BCB1;BCB1;1107 1166 11B8;BCB1;1107 1166 11B8;
    // (벱; 벱; 벱; 벱; 벱; ) HANGUL SYLLABLE BEB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_090)
{
    // BCB2;BCB2;1107 1166 11B9;BCB2;1107 1166 11B9;
    // (벲; 벲; 벲; 벲; 벲; ) HANGUL SYLLABLE BEBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_091)
{
    // BCB3;BCB3;1107 1166 11BA;BCB3;1107 1166 11BA;
    // (벳; 벳; 벳; 벳; 벳; ) HANGUL SYLLABLE BES
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_092)
{
    // BCB4;BCB4;1107 1166 11BB;BCB4;1107 1166 11BB;
    // (벴; 벴; 벴; 벴; 벴; ) HANGUL SYLLABLE BESS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB4 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB4 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_093)
{
    // BCB5;BCB5;1107 1166 11BC;BCB5;1107 1166 11BC;
    // (벵; 벵; 벵; 벵; 벵; ) HANGUL SYLLABLE BENG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_094)
{
    // BCB6;BCB6;1107 1166 11BD;BCB6;1107 1166 11BD;
    // (벶; 벶; 벶; 벶; 벶; ) HANGUL SYLLABLE BEJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_095)
{
    // BCB7;BCB7;1107 1166 11BE;BCB7;1107 1166 11BE;
    // (벷; 벷; 벷; 벷; 벷; ) HANGUL SYLLABLE BEC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_096)
{
    // BCB8;BCB8;1107 1166 11BF;BCB8;1107 1166 11BF;
    // (벸; 벸; 벸; 벸; 벸; ) HANGUL SYLLABLE BEK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB8 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB8 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_097)
{
    // BCB9;BCB9;1107 1166 11C0;BCB9;1107 1166 11C0;
    // (벹; 벹; 벹; 벹; 벹; ) HANGUL SYLLABLE BET
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCB9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCB9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCB9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_098)
{
    // BCBA;BCBA;1107 1166 11C1;BCBA;1107 1166 11C1;
    // (벺; 벺; 벺; 벺; 벺; ) HANGUL SYLLABLE BEP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_099)
{
    // BCBB;BCBB;1107 1166 11C2;BCBB;1107 1166 11C2;
    // (벻; 벻; 벻; 벻; 벻; ) HANGUL SYLLABLE BEH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1166, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1166, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_100)
{
    // BCBC;BCBC;1107 1167;BCBC;1107 1167;
    // (벼; 벼; 벼; 벼; 벼; ) HANGUL SYLLABLE BYEO
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBC }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1167 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBC }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1167 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_101)
{
    // BCBD;BCBD;1107 1167 11A8;BCBD;1107 1167 11A8;
    // (벽; 벽; 벽; 벽; 벽; ) HANGUL SYLLABLE BYEOG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBD }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBD }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBD }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_102)
{
    // BCBE;BCBE;1107 1167 11A9;BCBE;1107 1167 11A9;
    // (벾; 벾; 벾; 벾; 벾; ) HANGUL SYLLABLE BYEOGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_103)
{
    // BCBF;BCBF;1107 1167 11AA;BCBF;1107 1167 11AA;
    // (벿; 벿; 벿; 벿; 벿; ) HANGUL SYLLABLE BYEOGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCBF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCBF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCBF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_104)
{
    // BCC0;BCC0;1107 1167 11AB;BCC0;1107 1167 11AB;
    // (변; 변; 변; 변; 변; ) HANGUL SYLLABLE BYEON
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC0 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC0 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_105)
{
    // BCC1;BCC1;1107 1167 11AC;BCC1;1107 1167 11AC;
    // (볁; 볁; 볁; 볁; 볁; ) HANGUL SYLLABLE BYEONJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_106)
{
    // BCC2;BCC2;1107 1167 11AD;BCC2;1107 1167 11AD;
    // (볂; 볂; 볂; 볂; 볂; ) HANGUL SYLLABLE BYEONH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_107)
{
    // BCC3;BCC3;1107 1167 11AE;BCC3;1107 1167 11AE;
    // (볃; 볃; 볃; 볃; 볃; ) HANGUL SYLLABLE BYEOD
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_108)
{
    // BCC4;BCC4;1107 1167 11AF;BCC4;1107 1167 11AF;
    // (별; 별; 별; 별; 별; ) HANGUL SYLLABLE BYEOL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC4 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC4 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_109)
{
    // BCC5;BCC5;1107 1167 11B0;BCC5;1107 1167 11B0;
    // (볅; 볅; 볅; 볅; 볅; ) HANGUL SYLLABLE BYEOLG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_110)
{
    // BCC6;BCC6;1107 1167 11B1;BCC6;1107 1167 11B1;
    // (볆; 볆; 볆; 볆; 볆; ) HANGUL SYLLABLE BYEOLM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_111)
{
    // BCC7;BCC7;1107 1167 11B2;BCC7;1107 1167 11B2;
    // (볇; 볇; 볇; 볇; 볇; ) HANGUL SYLLABLE BYEOLB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_112)
{
    // BCC8;BCC8;1107 1167 11B3;BCC8;1107 1167 11B3;
    // (볈; 볈; 볈; 볈; 볈; ) HANGUL SYLLABLE BYEOLS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC8 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC8 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_113)
{
    // BCC9;BCC9;1107 1167 11B4;BCC9;1107 1167 11B4;
    // (볉; 볉; 볉; 볉; 볉; ) HANGUL SYLLABLE BYEOLT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCC9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCC9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCC9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_114)
{
    // BCCA;BCCA;1107 1167 11B5;BCCA;1107 1167 11B5;
    // (볊; 볊; 볊; 볊; 볊; ) HANGUL SYLLABLE BYEOLP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_115)
{
    // BCCB;BCCB;1107 1167 11B6;BCCB;1107 1167 11B6;
    // (볋; 볋; 볋; 볋; 볋; ) HANGUL SYLLABLE BYEOLH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_116)
{
    // BCCC;BCCC;1107 1167 11B7;BCCC;1107 1167 11B7;
    // (볌; 볌; 볌; 볌; 볌; ) HANGUL SYLLABLE BYEOM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCC }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCC }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_117)
{
    // BCCD;BCCD;1107 1167 11B8;BCCD;1107 1167 11B8;
    // (볍; 볍; 볍; 볍; 볍; ) HANGUL SYLLABLE BYEOB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCD }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCD }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCD }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_118)
{
    // BCCE;BCCE;1107 1167 11B9;BCCE;1107 1167 11B9;
    // (볎; 볎; 볎; 볎; 볎; ) HANGUL SYLLABLE BYEOBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_119)
{
    // BCCF;BCCF;1107 1167 11BA;BCCF;1107 1167 11BA;
    // (볏; 볏; 볏; 볏; 볏; ) HANGUL SYLLABLE BYEOS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCCF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCCF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCCF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_120)
{
    // BCD0;BCD0;1107 1167 11BB;BCD0;1107 1167 11BB;
    // (볐; 볐; 볐; 볐; 볐; ) HANGUL SYLLABLE BYEOSS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD0 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD0 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_121)
{
    // BCD1;BCD1;1107 1167 11BC;BCD1;1107 1167 11BC;
    // (병; 병; 병; 병; 병; ) HANGUL SYLLABLE BYEONG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_122)
{
    // BCD2;BCD2;1107 1167 11BD;BCD2;1107 1167 11BD;
    // (볒; 볒; 볒; 볒; 볒; ) HANGUL SYLLABLE BYEOJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_123)
{
    // BCD3;BCD3;1107 1167 11BE;BCD3;1107 1167 11BE;
    // (볓; 볓; 볓; 볓; 볓; ) HANGUL SYLLABLE BYEOC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_124)
{
    // BCD4;BCD4;1107 1167 11BF;BCD4;1107 1167 11BF;
    // (볔; 볔; 볔; 볔; 볔; ) HANGUL SYLLABLE BYEOK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD4 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD4 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_125)
{
    // BCD5;BCD5;1107 1167 11C0;BCD5;1107 1167 11C0;
    // (볕; 볕; 볕; 볕; 볕; ) HANGUL SYLLABLE BYEOT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_126)
{
    // BCD6;BCD6;1107 1167 11C1;BCD6;1107 1167 11C1;
    // (볖; 볖; 볖; 볖; 볖; ) HANGUL SYLLABLE BYEOP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_127)
{
    // BCD7;BCD7;1107 1167 11C2;BCD7;1107 1167 11C2;
    // (볗; 볗; 볗; 볗; 볗; ) HANGUL SYLLABLE BYEOH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1167, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1167, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_128)
{
    // BCD8;BCD8;1107 1168;BCD8;1107 1168;
    // (볘; 볘; 볘; 볘; 볘; ) HANGUL SYLLABLE BYE
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD8 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1168 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD8 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1168 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_129)
{
    // BCD9;BCD9;1107 1168 11A8;BCD9;1107 1168 11A8;
    // (볙; 볙; 볙; 볙; 볙; ) HANGUL SYLLABLE BYEG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCD9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCD9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCD9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_130)
{
    // BCDA;BCDA;1107 1168 11A9;BCDA;1107 1168 11A9;
    // (볚; 볚; 볚; 볚; 볚; ) HANGUL SYLLABLE BYEGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_131)
{
    // BCDB;BCDB;1107 1168 11AA;BCDB;1107 1168 11AA;
    // (볛; 볛; 볛; 볛; 볛; ) HANGUL SYLLABLE BYEGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_132)
{
    // BCDC;BCDC;1107 1168 11AB;BCDC;1107 1168 11AB;
    // (볜; 볜; 볜; 볜; 볜; ) HANGUL SYLLABLE BYEN
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDC }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDC }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_133)
{
    // BCDD;BCDD;1107 1168 11AC;BCDD;1107 1168 11AC;
    // (볝; 볝; 볝; 볝; 볝; ) HANGUL SYLLABLE BYENJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDD }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDD }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDD }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_134)
{
    // BCDE;BCDE;1107 1168 11AD;BCDE;1107 1168 11AD;
    // (볞; 볞; 볞; 볞; 볞; ) HANGUL SYLLABLE BYENH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_135)
{
    // BCDF;BCDF;1107 1168 11AE;BCDF;1107 1168 11AE;
    // (볟; 볟; 볟; 볟; 볟; ) HANGUL SYLLABLE BYED
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCDF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCDF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCDF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_136)
{
    // BCE0;BCE0;1107 1168 11AF;BCE0;1107 1168 11AF;
    // (볠; 볠; 볠; 볠; 볠; ) HANGUL SYLLABLE BYEL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE0 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE0 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_137)
{
    // BCE1;BCE1;1107 1168 11B0;BCE1;1107 1168 11B0;
    // (볡; 볡; 볡; 볡; 볡; ) HANGUL SYLLABLE BYELG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_138)
{
    // BCE2;BCE2;1107 1168 11B1;BCE2;1107 1168 11B1;
    // (볢; 볢; 볢; 볢; 볢; ) HANGUL SYLLABLE BYELM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_139)
{
    // BCE3;BCE3;1107 1168 11B2;BCE3;1107 1168 11B2;
    // (볣; 볣; 볣; 볣; 볣; ) HANGUL SYLLABLE BYELB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_140)
{
    // BCE4;BCE4;1107 1168 11B3;BCE4;1107 1168 11B3;
    // (볤; 볤; 볤; 볤; 볤; ) HANGUL SYLLABLE BYELS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE4 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE4 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_141)
{
    // BCE5;BCE5;1107 1168 11B4;BCE5;1107 1168 11B4;
    // (볥; 볥; 볥; 볥; 볥; ) HANGUL SYLLABLE BYELT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_142)
{
    // BCE6;BCE6;1107 1168 11B5;BCE6;1107 1168 11B5;
    // (볦; 볦; 볦; 볦; 볦; ) HANGUL SYLLABLE BYELP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_143)
{
    // BCE7;BCE7;1107 1168 11B6;BCE7;1107 1168 11B6;
    // (볧; 볧; 볧; 볧; 볧; ) HANGUL SYLLABLE BYELH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_144)
{
    // BCE8;BCE8;1107 1168 11B7;BCE8;1107 1168 11B7;
    // (볨; 볨; 볨; 볨; 볨; ) HANGUL SYLLABLE BYEM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE8 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE8 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_145)
{
    // BCE9;BCE9;1107 1168 11B8;BCE9;1107 1168 11B8;
    // (볩; 볩; 볩; 볩; 볩; ) HANGUL SYLLABLE BYEB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCE9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCE9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCE9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_146)
{
    // BCEA;BCEA;1107 1168 11B9;BCEA;1107 1168 11B9;
    // (볪; 볪; 볪; 볪; 볪; ) HANGUL SYLLABLE BYEBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCEA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCEA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCEA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_147)
{
    // BCEB;BCEB;1107 1168 11BA;BCEB;1107 1168 11BA;
    // (볫; 볫; 볫; 볫; 볫; ) HANGUL SYLLABLE BYES
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCEB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCEB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCEB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_148)
{
    // BCEC;BCEC;1107 1168 11BB;BCEC;1107 1168 11BB;
    // (볬; 볬; 볬; 볬; 볬; ) HANGUL SYLLABLE BYESS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCEC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCEC }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCEC }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_149)
{
    // BCED;BCED;1107 1168 11BC;BCED;1107 1168 11BC;
    // (볭; 볭; 볭; 볭; 볭; ) HANGUL SYLLABLE BYENG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCED }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCED }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCED }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_150)
{
    // BCEE;BCEE;1107 1168 11BD;BCEE;1107 1168 11BD;
    // (볮; 볮; 볮; 볮; 볮; ) HANGUL SYLLABLE BYEJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCEE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCEE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCEE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_151)
{
    // BCEF;BCEF;1107 1168 11BE;BCEF;1107 1168 11BE;
    // (볯; 볯; 볯; 볯; 볯; ) HANGUL SYLLABLE BYEC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCEF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCEF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCEF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_152)
{
    // BCF0;BCF0;1107 1168 11BF;BCF0;1107 1168 11BF;
    // (볰; 볰; 볰; 볰; 볰; ) HANGUL SYLLABLE BYEK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF0 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF0 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF0 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_153)
{
    // BCF1;BCF1;1107 1168 11C0;BCF1;1107 1168 11C0;
    // (볱; 볱; 볱; 볱; 볱; ) HANGUL SYLLABLE BYET
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF1 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF1 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF1 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_154)
{
    // BCF2;BCF2;1107 1168 11C1;BCF2;1107 1168 11C1;
    // (볲; 볲; 볲; 볲; 볲; ) HANGUL SYLLABLE BYEP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF2 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF2 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF2 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_155)
{
    // BCF3;BCF3;1107 1168 11C2;BCF3;1107 1168 11C2;
    // (볳; 볳; 볳; 볳; 볳; ) HANGUL SYLLABLE BYEH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF3 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF3 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1168, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF3 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1168, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_156)
{
    // BCF4;BCF4;1107 1169;BCF4;1107 1169;
    // (보; 보; 보; 보; 보; ) HANGUL SYLLABLE BO
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF4 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF4 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x1169 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF4 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x1169 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_157)
{
    // BCF5;BCF5;1107 1169 11A8;BCF5;1107 1169 11A8;
    // (복; 복; 복; 복; 복; ) HANGUL SYLLABLE BOG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF5 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF5 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF5 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_158)
{
    // BCF6;BCF6;1107 1169 11A9;BCF6;1107 1169 11A9;
    // (볶; 볶; 볶; 볶; 볶; ) HANGUL SYLLABLE BOGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF6 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF6 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF6 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_159)
{
    // BCF7;BCF7;1107 1169 11AA;BCF7;1107 1169 11AA;
    // (볷; 볷; 볷; 볷; 볷; ) HANGUL SYLLABLE BOGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF7 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF7 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF7 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_160)
{
    // BCF8;BCF8;1107 1169 11AB;BCF8;1107 1169 11AB;
    // (본; 본; 본; 본; 본; ) HANGUL SYLLABLE BON
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF8 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF8 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF8 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_161)
{
    // BCF9;BCF9;1107 1169 11AC;BCF9;1107 1169 11AC;
    // (볹; 볹; 볹; 볹; 볹; ) HANGUL SYLLABLE BONJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCF9 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCF9 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCF9 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_162)
{
    // BCFA;BCFA;1107 1169 11AD;BCFA;1107 1169 11AD;
    // (볺; 볺; 볺; 볺; 볺; ) HANGUL SYLLABLE BONH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFA }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFA }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFA }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_163)
{
    // BCFB;BCFB;1107 1169 11AE;BCFB;1107 1169 11AE;
    // (볻; 볻; 볻; 볻; 볻; ) HANGUL SYLLABLE BOD
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFB }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFB }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFB }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_164)
{
    // BCFC;BCFC;1107 1169 11AF;BCFC;1107 1169 11AF;
    // (볼; 볼; 볼; 볼; 볼; ) HANGUL SYLLABLE BOL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFC }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFC }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFC }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_165)
{
    // BCFD;BCFD;1107 1169 11B0;BCFD;1107 1169 11B0;
    // (볽; 볽; 볽; 볽; 볽; ) HANGUL SYLLABLE BOLG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFD }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFD }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFD }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_166)
{
    // BCFE;BCFE;1107 1169 11B1;BCFE;1107 1169 11B1;
    // (볾; 볾; 볾; 볾; 볾; ) HANGUL SYLLABLE BOLM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFE }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFE }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFE }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_167)
{
    // BCFF;BCFF;1107 1169 11B2;BCFF;1107 1169 11B2;
    // (볿; 볿; 볿; 볿; 볿; ) HANGUL SYLLABLE BOLB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBCFF }};
        std::array<uint32_t, 1> const c2 = {{ 0xBCFF }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBCFF }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_168)
{
    // BD00;BD00;1107 1169 11B3;BD00;1107 1169 11B3;
    // (봀; 봀; 봀; 봀; 봀; ) HANGUL SYLLABLE BOLS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD00 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD00 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD00 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_169)
{
    // BD01;BD01;1107 1169 11B4;BD01;1107 1169 11B4;
    // (봁; 봁; 봁; 봁; 봁; ) HANGUL SYLLABLE BOLT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD01 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD01 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD01 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_170)
{
    // BD02;BD02;1107 1169 11B5;BD02;1107 1169 11B5;
    // (봂; 봂; 봂; 봂; 봂; ) HANGUL SYLLABLE BOLP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD02 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD02 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD02 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_171)
{
    // BD03;BD03;1107 1169 11B6;BD03;1107 1169 11B6;
    // (봃; 봃; 봃; 봃; 봃; ) HANGUL SYLLABLE BOLH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD03 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD03 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD03 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_172)
{
    // BD04;BD04;1107 1169 11B7;BD04;1107 1169 11B7;
    // (봄; 봄; 봄; 봄; 봄; ) HANGUL SYLLABLE BOM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD04 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD04 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B7 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD04 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B7 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_173)
{
    // BD05;BD05;1107 1169 11B8;BD05;1107 1169 11B8;
    // (봅; 봅; 봅; 봅; 봅; ) HANGUL SYLLABLE BOB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD05 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD05 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD05 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_174)
{
    // BD06;BD06;1107 1169 11B9;BD06;1107 1169 11B9;
    // (봆; 봆; 봆; 봆; 봆; ) HANGUL SYLLABLE BOBS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD06 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD06 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11B9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD06 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11B9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_175)
{
    // BD07;BD07;1107 1169 11BA;BD07;1107 1169 11BA;
    // (봇; 봇; 봇; 봇; 봇; ) HANGUL SYLLABLE BOS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD07 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD07 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD07 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_176)
{
    // BD08;BD08;1107 1169 11BB;BD08;1107 1169 11BB;
    // (봈; 봈; 봈; 봈; 봈; ) HANGUL SYLLABLE BOSS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD08 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD08 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD08 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_177)
{
    // BD09;BD09;1107 1169 11BC;BD09;1107 1169 11BC;
    // (봉; 봉; 봉; 봉; 봉; ) HANGUL SYLLABLE BONG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD09 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD09 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD09 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_178)
{
    // BD0A;BD0A;1107 1169 11BD;BD0A;1107 1169 11BD;
    // (봊; 봊; 봊; 봊; 봊; ) HANGUL SYLLABLE BOJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_179)
{
    // BD0B;BD0B;1107 1169 11BE;BD0B;1107 1169 11BE;
    // (봋; 봋; 봋; 봋; 봋; ) HANGUL SYLLABLE BOC
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_180)
{
    // BD0C;BD0C;1107 1169 11BF;BD0C;1107 1169 11BF;
    // (봌; 봌; 봌; 봌; 봌; ) HANGUL SYLLABLE BOK
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11BF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11BF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_181)
{
    // BD0D;BD0D;1107 1169 11C0;BD0D;1107 1169 11C0;
    // (봍; 봍; 봍; 봍; 봍; ) HANGUL SYLLABLE BOT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11C0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11C0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_182)
{
    // BD0E;BD0E;1107 1169 11C1;BD0E;1107 1169 11C1;
    // (봎; 봎; 봎; 봎; 봎; ) HANGUL SYLLABLE BOP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11C1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11C1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_183)
{
    // BD0F;BD0F;1107 1169 11C2;BD0F;1107 1169 11C2;
    // (봏; 봏; 봏; 봏; 봏; ) HANGUL SYLLABLE BOH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD0F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD0F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x1169, 0x11C2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD0F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x1169, 0x11C2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_184)
{
    // BD10;BD10;1107 116A;BD10;1107 116A;
    // (봐; 봐; 봐; 봐; 봐; ) HANGUL SYLLABLE BWA
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD10 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD10 }};
        std::array<uint32_t, 2> const c3 = {{ 0x1107, 0x116A }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD10 }};
        std::array<uint32_t, 2> const c5 = {{ 0x1107, 0x116A }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_185)
{
    // BD11;BD11;1107 116A 11A8;BD11;1107 116A 11A8;
    // (봑; 봑; 봑; 봑; 봑; ) HANGUL SYLLABLE BWAG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD11 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD11 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11A8 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD11 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11A8 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_186)
{
    // BD12;BD12;1107 116A 11A9;BD12;1107 116A 11A9;
    // (봒; 봒; 봒; 봒; 봒; ) HANGUL SYLLABLE BWAGG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD12 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD12 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11A9 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD12 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11A9 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_187)
{
    // BD13;BD13;1107 116A 11AA;BD13;1107 116A 11AA;
    // (봓; 봓; 봓; 봓; 봓; ) HANGUL SYLLABLE BWAGS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD13 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD13 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AA }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD13 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AA }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_188)
{
    // BD14;BD14;1107 116A 11AB;BD14;1107 116A 11AB;
    // (봔; 봔; 봔; 봔; 봔; ) HANGUL SYLLABLE BWAN
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD14 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD14 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AB }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD14 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AB }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_189)
{
    // BD15;BD15;1107 116A 11AC;BD15;1107 116A 11AC;
    // (봕; 봕; 봕; 봕; 봕; ) HANGUL SYLLABLE BWANJ
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD15 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD15 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AC }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD15 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AC }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_190)
{
    // BD16;BD16;1107 116A 11AD;BD16;1107 116A 11AD;
    // (봖; 봖; 봖; 봖; 봖; ) HANGUL SYLLABLE BWANH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD16 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD16 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AD }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD16 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AD }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_191)
{
    // BD17;BD17;1107 116A 11AE;BD17;1107 116A 11AE;
    // (봗; 봗; 봗; 봗; 봗; ) HANGUL SYLLABLE BWAD
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD17 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD17 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AE }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD17 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AE }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_192)
{
    // BD18;BD18;1107 116A 11AF;BD18;1107 116A 11AF;
    // (봘; 봘; 봘; 봘; 봘; ) HANGUL SYLLABLE BWAL
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD18 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD18 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11AF }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD18 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11AF }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_193)
{
    // BD19;BD19;1107 116A 11B0;BD19;1107 116A 11B0;
    // (봙; 봙; 봙; 봙; 봙; ) HANGUL SYLLABLE BWALG
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD19 }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD19 }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B0 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD19 }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B0 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_194)
{
    // BD1A;BD1A;1107 116A 11B1;BD1A;1107 116A 11B1;
    // (봚; 봚; 봚; 봚; 봚; ) HANGUL SYLLABLE BWALM
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1A }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1A }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B1 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1A }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B1 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_195)
{
    // BD1B;BD1B;1107 116A 11B2;BD1B;1107 116A 11B2;
    // (봛; 봛; 봛; 봛; 봛; ) HANGUL SYLLABLE BWALB
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1B }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1B }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B2 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1B }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B2 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_196)
{
    // BD1C;BD1C;1107 116A 11B3;BD1C;1107 116A 11B3;
    // (봜; 봜; 봜; 봜; 봜; ) HANGUL SYLLABLE BWALS
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1C }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1C }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B3 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1C }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B3 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_197)
{
    // BD1D;BD1D;1107 116A 11B4;BD1D;1107 116A 11B4;
    // (봝; 봝; 봝; 봝; 봝; ) HANGUL SYLLABLE BWALT
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1D }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1D }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B4 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1D }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B4 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_198)
{
    // BD1E;BD1E;1107 116A 11B5;BD1E;1107 116A 11B5;
    // (봞; 봞; 봞; 봞; 봞; ) HANGUL SYLLABLE BWALP
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1E }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1E }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B5 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1E }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B5 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

TEST(normalization, nfkd_033_199)
{
    // BD1F;BD1F;1107 116A 11B6;BD1F;1107 116A 11B6;
    // (봟; 봟; 봟; 봟; 봟; ) HANGUL SYLLABLE BWALH
    {
        std::array<uint32_t, 1> const c1 = {{ 0xBD1F }};
        std::array<uint32_t, 1> const c2 = {{ 0xBD1F }};
        std::array<uint32_t, 3> const c3 = {{ 0x1107, 0x116A, 0x11B6 }};
        std::array<uint32_t, 1> const c4 = {{ 0xBD1F }};
        std::array<uint32_t, 3> const c5 = {{ 0x1107, 0x116A, 0x11B6 }};

        EXPECT_TRUE(boost::text::normalized_nfc(c2.begin(), c2.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c2.begin(), c2.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c3.begin(), c3.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c3.begin(), c3.end()));

        EXPECT_TRUE(boost::text::normalized_nfc(c4.begin(), c4.end()));
        EXPECT_TRUE(boost::text::normalized_nfkc(c4.begin(), c4.end()));

        EXPECT_TRUE(boost::text::normalized_nfd(c5.begin(), c5.end()));
        EXPECT_TRUE(boost::text::normalized_nfkd(c5.begin(), c5.end()));

        {
            boost::text::string str = boost::text::to_string(c1.begin(), c1.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c2.begin(), c2.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c3.begin(), c3.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c4.begin(), c4.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

        {
            boost::text::string str = boost::text::to_string(c5.begin(), c5.end());
            boost::text::normalize_to_nfkd(str);
            boost::text::utf32_range utf32_range(str);
            EXPECT_EQ(std::distance(utf32_range.begin(), utf32_range.end()), c5.size());
            auto c5_it = c5.begin();
            int i = 0;
            for (auto x : utf32_range) {
                EXPECT_EQ(x, *c5_it) << "iteration " << i;
                ++c5_it;
                ++i;
            }
        }

    }
}

max_stars_repo_name: jan-moeller/text

max_issues_repo_name: jan-moeller/text

max_forks_repo_name: jan-moeller/text