text: // Copyright (C) 2020 T. Zachary Laine
  //
  // Distributed under the Boost Software License, Version 1.0. (See
  // accompanying file LICENSE_1_0.txt or copy at
  // http://www.boost.org/LICENSE_1_0.txt)
  
  // Warning! This file is autogenerated.
  #include <boost/text/normalize_string.hpp>
  #include <boost/text/transcode_view.hpp>
  #include <boost/text/string_utility.hpp>
  
  #include <gtest/gtest.h>
  
  #include <algorithm>
  
  
  
  TEST(normalization, nfc_031_000)
  {
      // BAC8;BAC8;1106 116A 11AB;BAC8;1106 116A 11AB; 
      // (뫈; 뫈; 뫈; 뫈; 뫈; ) HANGUL SYLLABLE MWAN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAC8 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAC8 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAC8 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_001)
  {
      // BAC9;BAC9;1106 116A 11AC;BAC9;1106 116A 11AC; 
      // (뫉; 뫉; 뫉; 뫉; 뫉; ) HANGUL SYLLABLE MWANJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAC9 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAC9 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAC9 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_002)
  {
      // BACA;BACA;1106 116A 11AD;BACA;1106 116A 11AD; 
      // (뫊; 뫊; 뫊; 뫊; 뫊; ) HANGUL SYLLABLE MWANH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACA }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACA }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACA }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_003)
  {
      // BACB;BACB;1106 116A 11AE;BACB;1106 116A 11AE; 
      // (뫋; 뫋; 뫋; 뫋; 뫋; ) HANGUL SYLLABLE MWAD
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACB }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACB }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACB }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_004)
  {
      // BACC;BACC;1106 116A 11AF;BACC;1106 116A 11AF; 
      // (뫌; 뫌; 뫌; 뫌; 뫌; ) HANGUL SYLLABLE MWAL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACC }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACC }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACC }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_005)
  {
      // BACD;BACD;1106 116A 11B0;BACD;1106 116A 11B0; 
      // (뫍; 뫍; 뫍; 뫍; 뫍; ) HANGUL SYLLABLE MWALG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACD }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACD }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACD }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_006)
  {
      // BACE;BACE;1106 116A 11B1;BACE;1106 116A 11B1; 
      // (뫎; 뫎; 뫎; 뫎; 뫎; ) HANGUL SYLLABLE MWALM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACE }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACE }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACE }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_007)
  {
      // BACF;BACF;1106 116A 11B2;BACF;1106 116A 11B2; 
      // (뫏; 뫏; 뫏; 뫏; 뫏; ) HANGUL SYLLABLE MWALB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBACF }};
          std::array<uint32_t, 1> const c2 = {{ 0xBACF }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBACF }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_008)
  {
      // BAD0;BAD0;1106 116A 11B3;BAD0;1106 116A 11B3; 
      // (뫐; 뫐; 뫐; 뫐; 뫐; ) HANGUL SYLLABLE MWALS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD0 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD0 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD0 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_009)
  {
      // BAD1;BAD1;1106 116A 11B4;BAD1;1106 116A 11B4; 
      // (뫑; 뫑; 뫑; 뫑; 뫑; ) HANGUL SYLLABLE MWALT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD1 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD1 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD1 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_010)
  {
      // BAD2;BAD2;1106 116A 11B5;BAD2;1106 116A 11B5; 
      // (뫒; 뫒; 뫒; 뫒; 뫒; ) HANGUL SYLLABLE MWALP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD2 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD2 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD2 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_011)
  {
      // BAD3;BAD3;1106 116A 11B6;BAD3;1106 116A 11B6; 
      // (뫓; 뫓; 뫓; 뫓; 뫓; ) HANGUL SYLLABLE MWALH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD3 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD3 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD3 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_012)
  {
      // BAD4;BAD4;1106 116A 11B7;BAD4;1106 116A 11B7; 
      // (뫔; 뫔; 뫔; 뫔; 뫔; ) HANGUL SYLLABLE MWAM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD4 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD4 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD4 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_013)
  {
      // BAD5;BAD5;1106 116A 11B8;BAD5;1106 116A 11B8; 
      // (뫕; 뫕; 뫕; 뫕; 뫕; ) HANGUL SYLLABLE MWAB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD5 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD5 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD5 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_014)
  {
      // BAD6;BAD6;1106 116A 11B9;BAD6;1106 116A 11B9; 
      // (뫖; 뫖; 뫖; 뫖; 뫖; ) HANGUL SYLLABLE MWABS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD6 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD6 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD6 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_015)
  {
      // BAD7;BAD7;1106 116A 11BA;BAD7;1106 116A 11BA; 
      // (뫗; 뫗; 뫗; 뫗; 뫗; ) HANGUL SYLLABLE MWAS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD7 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD7 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD7 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_016)
  {
      // BAD8;BAD8;1106 116A 11BB;BAD8;1106 116A 11BB; 
      // (뫘; 뫘; 뫘; 뫘; 뫘; ) HANGUL SYLLABLE MWASS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD8 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD8 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD8 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_017)
  {
      // BAD9;BAD9;1106 116A 11BC;BAD9;1106 116A 11BC; 
      // (뫙; 뫙; 뫙; 뫙; 뫙; ) HANGUL SYLLABLE MWANG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAD9 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAD9 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAD9 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_018)
  {
      // BADA;BADA;1106 116A 11BD;BADA;1106 116A 11BD; 
      // (뫚; 뫚; 뫚; 뫚; 뫚; ) HANGUL SYLLABLE MWAJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADA }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADA }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADA }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_019)
  {
      // BADB;BADB;1106 116A 11BE;BADB;1106 116A 11BE; 
      // (뫛; 뫛; 뫛; 뫛; 뫛; ) HANGUL SYLLABLE MWAC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADB }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADB }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADB }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_020)
  {
      // BADC;BADC;1106 116A 11BF;BADC;1106 116A 11BF; 
      // (뫜; 뫜; 뫜; 뫜; 뫜; ) HANGUL SYLLABLE MWAK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADC }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADC }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADC }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_021)
  {
      // BADD;BADD;1106 116A 11C0;BADD;1106 116A 11C0; 
      // (뫝; 뫝; 뫝; 뫝; 뫝; ) HANGUL SYLLABLE MWAT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADD }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADD }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADD }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_022)
  {
      // BADE;BADE;1106 116A 11C1;BADE;1106 116A 11C1; 
      // (뫞; 뫞; 뫞; 뫞; 뫞; ) HANGUL SYLLABLE MWAP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADE }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADE }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADE }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_023)
  {
      // BADF;BADF;1106 116A 11C2;BADF;1106 116A 11C2; 
      // (뫟; 뫟; 뫟; 뫟; 뫟; ) HANGUL SYLLABLE MWAH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBADF }};
          std::array<uint32_t, 1> const c2 = {{ 0xBADF }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116A, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBADF }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116A, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_024)
  {
      // BAE0;BAE0;1106 116B;BAE0;1106 116B; 
      // (뫠; 뫠; 뫠; 뫠; 뫠; ) HANGUL SYLLABLE MWAE
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE0 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE0 }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x116B }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE0 }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x116B }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_025)
  {
      // BAE1;BAE1;1106 116B 11A8;BAE1;1106 116B 11A8; 
      // (뫡; 뫡; 뫡; 뫡; 뫡; ) HANGUL SYLLABLE MWAEG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE1 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE1 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE1 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_026)
  {
      // BAE2;BAE2;1106 116B 11A9;BAE2;1106 116B 11A9; 
      // (뫢; 뫢; 뫢; 뫢; 뫢; ) HANGUL SYLLABLE MWAEGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE2 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE2 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE2 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_027)
  {
      // BAE3;BAE3;1106 116B 11AA;BAE3;1106 116B 11AA; 
      // (뫣; 뫣; 뫣; 뫣; 뫣; ) HANGUL SYLLABLE MWAEGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE3 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE3 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE3 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_028)
  {
      // BAE4;BAE4;1106 116B 11AB;BAE4;1106 116B 11AB; 
      // (뫤; 뫤; 뫤; 뫤; 뫤; ) HANGUL SYLLABLE MWAEN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE4 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE4 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE4 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_029)
  {
      // BAE5;BAE5;1106 116B 11AC;BAE5;1106 116B 11AC; 
      // (뫥; 뫥; 뫥; 뫥; 뫥; ) HANGUL SYLLABLE MWAENJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE5 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE5 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE5 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_030)
  {
      // BAE6;BAE6;1106 116B 11AD;BAE6;1106 116B 11AD; 
      // (뫦; 뫦; 뫦; 뫦; 뫦; ) HANGUL SYLLABLE MWAENH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE6 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE6 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE6 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_031)
  {
      // BAE7;BAE7;1106 116B 11AE;BAE7;1106 116B 11AE; 
      // (뫧; 뫧; 뫧; 뫧; 뫧; ) HANGUL SYLLABLE MWAED
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE7 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE7 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE7 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_032)
  {
      // BAE8;BAE8;1106 116B 11AF;BAE8;1106 116B 11AF; 
      // (뫨; 뫨; 뫨; 뫨; 뫨; ) HANGUL SYLLABLE MWAEL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE8 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE8 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE8 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_033)
  {
      // BAE9;BAE9;1106 116B 11B0;BAE9;1106 116B 11B0; 
      // (뫩; 뫩; 뫩; 뫩; 뫩; ) HANGUL SYLLABLE MWAELG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAE9 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAE9 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAE9 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_034)
  {
      // BAEA;BAEA;1106 116B 11B1;BAEA;1106 116B 11B1; 
      // (뫪; 뫪; 뫪; 뫪; 뫪; ) HANGUL SYLLABLE MWAELM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAEA }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAEA }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAEA }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_035)
  {
      // BAEB;BAEB;1106 116B 11B2;BAEB;1106 116B 11B2; 
      // (뫫; 뫫; 뫫; 뫫; 뫫; ) HANGUL SYLLABLE MWAELB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAEB }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAEB }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAEB }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_036)
  {
      // BAEC;BAEC;1106 116B 11B3;BAEC;1106 116B 11B3; 
      // (뫬; 뫬; 뫬; 뫬; 뫬; ) HANGUL SYLLABLE MWAELS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAEC }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAEC }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAEC }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_037)
  {
      // BAED;BAED;1106 116B 11B4;BAED;1106 116B 11B4; 
      // (뫭; 뫭; 뫭; 뫭; 뫭; ) HANGUL SYLLABLE MWAELT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAED }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAED }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAED }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_038)
  {
      // BAEE;BAEE;1106 116B 11B5;BAEE;1106 116B 11B5; 
      // (뫮; 뫮; 뫮; 뫮; 뫮; ) HANGUL SYLLABLE MWAELP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAEE }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAEE }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAEE }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_039)
  {
      // BAEF;BAEF;1106 116B 11B6;BAEF;1106 116B 11B6; 
      // (뫯; 뫯; 뫯; 뫯; 뫯; ) HANGUL SYLLABLE MWAELH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAEF }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAEF }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAEF }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_040)
  {
      // BAF0;BAF0;1106 116B 11B7;BAF0;1106 116B 11B7; 
      // (뫰; 뫰; 뫰; 뫰; 뫰; ) HANGUL SYLLABLE MWAEM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF0 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF0 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF0 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_041)
  {
      // BAF1;BAF1;1106 116B 11B8;BAF1;1106 116B 11B8; 
      // (뫱; 뫱; 뫱; 뫱; 뫱; ) HANGUL SYLLABLE MWAEB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF1 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF1 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF1 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_042)
  {
      // BAF2;BAF2;1106 116B 11B9;BAF2;1106 116B 11B9; 
      // (뫲; 뫲; 뫲; 뫲; 뫲; ) HANGUL SYLLABLE MWAEBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF2 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF2 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF2 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_043)
  {
      // BAF3;BAF3;1106 116B 11BA;BAF3;1106 116B 11BA; 
      // (뫳; 뫳; 뫳; 뫳; 뫳; ) HANGUL SYLLABLE MWAES
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF3 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF3 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF3 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_044)
  {
      // BAF4;BAF4;1106 116B 11BB;BAF4;1106 116B 11BB; 
      // (뫴; 뫴; 뫴; 뫴; 뫴; ) HANGUL SYLLABLE MWAESS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF4 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF4 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF4 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_045)
  {
      // BAF5;BAF5;1106 116B 11BC;BAF5;1106 116B 11BC; 
      // (뫵; 뫵; 뫵; 뫵; 뫵; ) HANGUL SYLLABLE MWAENG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF5 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF5 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF5 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_046)
  {
      // BAF6;BAF6;1106 116B 11BD;BAF6;1106 116B 11BD; 
      // (뫶; 뫶; 뫶; 뫶; 뫶; ) HANGUL SYLLABLE MWAEJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF6 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF6 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF6 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_047)
  {
      // BAF7;BAF7;1106 116B 11BE;BAF7;1106 116B 11BE; 
      // (뫷; 뫷; 뫷; 뫷; 뫷; ) HANGUL SYLLABLE MWAEC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF7 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF7 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF7 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_048)
  {
      // BAF8;BAF8;1106 116B 11BF;BAF8;1106 116B 11BF; 
      // (뫸; 뫸; 뫸; 뫸; 뫸; ) HANGUL SYLLABLE MWAEK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF8 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF8 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF8 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_049)
  {
      // BAF9;BAF9;1106 116B 11C0;BAF9;1106 116B 11C0; 
      // (뫹; 뫹; 뫹; 뫹; 뫹; ) HANGUL SYLLABLE MWAET
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAF9 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAF9 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAF9 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_050)
  {
      // BAFA;BAFA;1106 116B 11C1;BAFA;1106 116B 11C1; 
      // (뫺; 뫺; 뫺; 뫺; 뫺; ) HANGUL SYLLABLE MWAEP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFA }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFA }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFA }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_051)
  {
      // BAFB;BAFB;1106 116B 11C2;BAFB;1106 116B 11C2; 
      // (뫻; 뫻; 뫻; 뫻; 뫻; ) HANGUL SYLLABLE MWAEH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFB }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFB }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116B, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFB }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116B, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_052)
  {
      // BAFC;BAFC;1106 116C;BAFC;1106 116C; 
      // (뫼; 뫼; 뫼; 뫼; 뫼; ) HANGUL SYLLABLE MOE
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFC }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFC }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x116C }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFC }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x116C }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_053)
  {
      // BAFD;BAFD;1106 116C 11A8;BAFD;1106 116C 11A8; 
      // (뫽; 뫽; 뫽; 뫽; 뫽; ) HANGUL SYLLABLE MOEG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFD }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFD }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFD }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_054)
  {
      // BAFE;BAFE;1106 116C 11A9;BAFE;1106 116C 11A9; 
      // (뫾; 뫾; 뫾; 뫾; 뫾; ) HANGUL SYLLABLE MOEGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFE }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFE }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFE }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_055)
  {
      // BAFF;BAFF;1106 116C 11AA;BAFF;1106 116C 11AA; 
      // (뫿; 뫿; 뫿; 뫿; 뫿; ) HANGUL SYLLABLE MOEGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBAFF }};
          std::array<uint32_t, 1> const c2 = {{ 0xBAFF }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBAFF }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_056)
  {
      // BB00;BB00;1106 116C 11AB;BB00;1106 116C 11AB; 
      // (묀; 묀; 묀; 묀; 묀; ) HANGUL SYLLABLE MOEN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB00 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB00 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB00 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_057)
  {
      // BB01;BB01;1106 116C 11AC;BB01;1106 116C 11AC; 
      // (묁; 묁; 묁; 묁; 묁; ) HANGUL SYLLABLE MOENJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB01 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB01 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB01 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_058)
  {
      // BB02;BB02;1106 116C 11AD;BB02;1106 116C 11AD; 
      // (묂; 묂; 묂; 묂; 묂; ) HANGUL SYLLABLE MOENH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB02 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB02 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB02 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_059)
  {
      // BB03;BB03;1106 116C 11AE;BB03;1106 116C 11AE; 
      // (묃; 묃; 묃; 묃; 묃; ) HANGUL SYLLABLE MOED
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB03 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB03 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB03 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_060)
  {
      // BB04;BB04;1106 116C 11AF;BB04;1106 116C 11AF; 
      // (묄; 묄; 묄; 묄; 묄; ) HANGUL SYLLABLE MOEL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB04 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB04 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB04 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_061)
  {
      // BB05;BB05;1106 116C 11B0;BB05;1106 116C 11B0; 
      // (묅; 묅; 묅; 묅; 묅; ) HANGUL SYLLABLE MOELG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB05 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB05 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB05 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_062)
  {
      // BB06;BB06;1106 116C 11B1;BB06;1106 116C 11B1; 
      // (묆; 묆; 묆; 묆; 묆; ) HANGUL SYLLABLE MOELM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB06 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB06 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB06 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_063)
  {
      // BB07;BB07;1106 116C 11B2;BB07;1106 116C 11B2; 
      // (묇; 묇; 묇; 묇; 묇; ) HANGUL SYLLABLE MOELB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB07 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB07 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB07 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_064)
  {
      // BB08;BB08;1106 116C 11B3;BB08;1106 116C 11B3; 
      // (묈; 묈; 묈; 묈; 묈; ) HANGUL SYLLABLE MOELS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB08 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB08 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB08 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_065)
  {
      // BB09;BB09;1106 116C 11B4;BB09;1106 116C 11B4; 
      // (묉; 묉; 묉; 묉; 묉; ) HANGUL SYLLABLE MOELT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB09 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB09 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB09 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_066)
  {
      // BB0A;BB0A;1106 116C 11B5;BB0A;1106 116C 11B5; 
      // (묊; 묊; 묊; 묊; 묊; ) HANGUL SYLLABLE MOELP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_067)
  {
      // BB0B;BB0B;1106 116C 11B6;BB0B;1106 116C 11B6; 
      // (묋; 묋; 묋; 묋; 묋; ) HANGUL SYLLABLE MOELH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_068)
  {
      // BB0C;BB0C;1106 116C 11B7;BB0C;1106 116C 11B7; 
      // (묌; 묌; 묌; 묌; 묌; ) HANGUL SYLLABLE MOEM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_069)
  {
      // BB0D;BB0D;1106 116C 11B8;BB0D;1106 116C 11B8; 
      // (묍; 묍; 묍; 묍; 묍; ) HANGUL SYLLABLE MOEB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_070)
  {
      // BB0E;BB0E;1106 116C 11B9;BB0E;1106 116C 11B9; 
      // (묎; 묎; 묎; 묎; 묎; ) HANGUL SYLLABLE MOEBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_071)
  {
      // BB0F;BB0F;1106 116C 11BA;BB0F;1106 116C 11BA; 
      // (묏; 묏; 묏; 묏; 묏; ) HANGUL SYLLABLE MOES
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB0F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB0F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB0F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_072)
  {
      // BB10;BB10;1106 116C 11BB;BB10;1106 116C 11BB; 
      // (묐; 묐; 묐; 묐; 묐; ) HANGUL SYLLABLE MOESS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB10 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB10 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB10 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_073)
  {
      // BB11;BB11;1106 116C 11BC;BB11;1106 116C 11BC; 
      // (묑; 묑; 묑; 묑; 묑; ) HANGUL SYLLABLE MOENG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB11 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB11 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB11 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_074)
  {
      // BB12;BB12;1106 116C 11BD;BB12;1106 116C 11BD; 
      // (묒; 묒; 묒; 묒; 묒; ) HANGUL SYLLABLE MOEJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB12 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB12 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB12 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_075)
  {
      // BB13;BB13;1106 116C 11BE;BB13;1106 116C 11BE; 
      // (묓; 묓; 묓; 묓; 묓; ) HANGUL SYLLABLE MOEC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB13 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB13 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB13 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_076)
  {
      // BB14;BB14;1106 116C 11BF;BB14;1106 116C 11BF; 
      // (묔; 묔; 묔; 묔; 묔; ) HANGUL SYLLABLE MOEK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB14 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB14 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB14 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_077)
  {
      // BB15;BB15;1106 116C 11C0;BB15;1106 116C 11C0; 
      // (묕; 묕; 묕; 묕; 묕; ) HANGUL SYLLABLE MOET
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB15 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB15 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB15 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_078)
  {
      // BB16;BB16;1106 116C 11C1;BB16;1106 116C 11C1; 
      // (묖; 묖; 묖; 묖; 묖; ) HANGUL SYLLABLE MOEP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB16 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB16 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB16 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_079)
  {
      // BB17;BB17;1106 116C 11C2;BB17;1106 116C 11C2; 
      // (묗; 묗; 묗; 묗; 묗; ) HANGUL SYLLABLE MOEH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB17 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB17 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116C, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB17 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116C, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_080)
  {
      // BB18;BB18;1106 116D;BB18;1106 116D; 
      // (묘; 묘; 묘; 묘; 묘; ) HANGUL SYLLABLE MYO
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB18 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB18 }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x116D }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB18 }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x116D }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_081)
  {
      // BB19;BB19;1106 116D 11A8;BB19;1106 116D 11A8; 
      // (묙; 묙; 묙; 묙; 묙; ) HANGUL SYLLABLE MYOG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB19 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB19 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB19 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_082)
  {
      // BB1A;BB1A;1106 116D 11A9;BB1A;1106 116D 11A9; 
      // (묚; 묚; 묚; 묚; 묚; ) HANGUL SYLLABLE MYOGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_083)
  {
      // BB1B;BB1B;1106 116D 11AA;BB1B;1106 116D 11AA; 
      // (묛; 묛; 묛; 묛; 묛; ) HANGUL SYLLABLE MYOGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_084)
  {
      // BB1C;BB1C;1106 116D 11AB;BB1C;1106 116D 11AB; 
      // (묜; 묜; 묜; 묜; 묜; ) HANGUL SYLLABLE MYON
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_085)
  {
      // BB1D;BB1D;1106 116D 11AC;BB1D;1106 116D 11AC; 
      // (묝; 묝; 묝; 묝; 묝; ) HANGUL SYLLABLE MYONJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_086)
  {
      // BB1E;BB1E;1106 116D 11AD;BB1E;1106 116D 11AD; 
      // (묞; 묞; 묞; 묞; 묞; ) HANGUL SYLLABLE MYONH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_087)
  {
      // BB1F;BB1F;1106 116D 11AE;BB1F;1106 116D 11AE; 
      // (묟; 묟; 묟; 묟; 묟; ) HANGUL SYLLABLE MYOD
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB1F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB1F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB1F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_088)
  {
      // BB20;BB20;1106 116D 11AF;BB20;1106 116D 11AF; 
      // (묠; 묠; 묠; 묠; 묠; ) HANGUL SYLLABLE MYOL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB20 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB20 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB20 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_089)
  {
      // BB21;BB21;1106 116D 11B0;BB21;1106 116D 11B0; 
      // (묡; 묡; 묡; 묡; 묡; ) HANGUL SYLLABLE MYOLG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB21 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB21 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB21 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_090)
  {
      // BB22;BB22;1106 116D 11B1;BB22;1106 116D 11B1; 
      // (묢; 묢; 묢; 묢; 묢; ) HANGUL SYLLABLE MYOLM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB22 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB22 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB22 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_091)
  {
      // BB23;BB23;1106 116D 11B2;BB23;1106 116D 11B2; 
      // (묣; 묣; 묣; 묣; 묣; ) HANGUL SYLLABLE MYOLB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB23 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB23 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB23 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_092)
  {
      // BB24;BB24;1106 116D 11B3;BB24;1106 116D 11B3; 
      // (묤; 묤; 묤; 묤; 묤; ) HANGUL SYLLABLE MYOLS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB24 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB24 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB24 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_093)
  {
      // BB25;BB25;1106 116D 11B4;BB25;1106 116D 11B4; 
      // (묥; 묥; 묥; 묥; 묥; ) HANGUL SYLLABLE MYOLT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB25 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB25 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB25 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_094)
  {
      // BB26;BB26;1106 116D 11B5;BB26;1106 116D 11B5; 
      // (묦; 묦; 묦; 묦; 묦; ) HANGUL SYLLABLE MYOLP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB26 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB26 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB26 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_095)
  {
      // BB27;BB27;1106 116D 11B6;BB27;1106 116D 11B6; 
      // (묧; 묧; 묧; 묧; 묧; ) HANGUL SYLLABLE MYOLH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB27 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB27 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB27 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_096)
  {
      // BB28;BB28;1106 116D 11B7;BB28;1106 116D 11B7; 
      // (묨; 묨; 묨; 묨; 묨; ) HANGUL SYLLABLE MYOM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB28 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB28 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB28 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_097)
  {
      // BB29;BB29;1106 116D 11B8;BB29;1106 116D 11B8; 
      // (묩; 묩; 묩; 묩; 묩; ) HANGUL SYLLABLE MYOB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB29 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB29 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB29 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_098)
  {
      // BB2A;BB2A;1106 116D 11B9;BB2A;1106 116D 11B9; 
      // (묪; 묪; 묪; 묪; 묪; ) HANGUL SYLLABLE MYOBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_099)
  {
      // BB2B;BB2B;1106 116D 11BA;BB2B;1106 116D 11BA; 
      // (묫; 묫; 묫; 묫; 묫; ) HANGUL SYLLABLE MYOS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_100)
  {
      // BB2C;BB2C;1106 116D 11BB;BB2C;1106 116D 11BB; 
      // (묬; 묬; 묬; 묬; 묬; ) HANGUL SYLLABLE MYOSS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_101)
  {
      // BB2D;BB2D;1106 116D 11BC;BB2D;1106 116D 11BC; 
      // (묭; 묭; 묭; 묭; 묭; ) HANGUL SYLLABLE MYONG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_102)
  {
      // BB2E;BB2E;1106 116D 11BD;BB2E;1106 116D 11BD; 
      // (묮; 묮; 묮; 묮; 묮; ) HANGUL SYLLABLE MYOJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_103)
  {
      // BB2F;BB2F;1106 116D 11BE;BB2F;1106 116D 11BE; 
      // (묯; 묯; 묯; 묯; 묯; ) HANGUL SYLLABLE MYOC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB2F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB2F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB2F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_104)
  {
      // BB30;BB30;1106 116D 11BF;BB30;1106 116D 11BF; 
      // (묰; 묰; 묰; 묰; 묰; ) HANGUL SYLLABLE MYOK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB30 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB30 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB30 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_105)
  {
      // BB31;BB31;1106 116D 11C0;BB31;1106 116D 11C0; 
      // (묱; 묱; 묱; 묱; 묱; ) HANGUL SYLLABLE MYOT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB31 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB31 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB31 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_106)
  {
      // BB32;BB32;1106 116D 11C1;BB32;1106 116D 11C1; 
      // (묲; 묲; 묲; 묲; 묲; ) HANGUL SYLLABLE MYOP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB32 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB32 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB32 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_107)
  {
      // BB33;BB33;1106 116D 11C2;BB33;1106 116D 11C2; 
      // (묳; 묳; 묳; 묳; 묳; ) HANGUL SYLLABLE MYOH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB33 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB33 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116D, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB33 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116D, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_108)
  {
      // BB34;BB34;1106 116E;BB34;1106 116E; 
      // (무; 무; 무; 무; 무; ) HANGUL SYLLABLE MU
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB34 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB34 }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x116E }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB34 }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x116E }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_109)
  {
      // BB35;BB35;1106 116E 11A8;BB35;1106 116E 11A8; 
      // (묵; 묵; 묵; 묵; 묵; ) HANGUL SYLLABLE MUG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB35 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB35 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB35 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_110)
  {
      // BB36;BB36;1106 116E 11A9;BB36;1106 116E 11A9; 
      // (묶; 묶; 묶; 묶; 묶; ) HANGUL SYLLABLE MUGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB36 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB36 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB36 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_111)
  {
      // BB37;BB37;1106 116E 11AA;BB37;1106 116E 11AA; 
      // (묷; 묷; 묷; 묷; 묷; ) HANGUL SYLLABLE MUGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB37 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB37 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB37 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_112)
  {
      // BB38;BB38;1106 116E 11AB;BB38;1106 116E 11AB; 
      // (문; 문; 문; 문; 문; ) HANGUL SYLLABLE MUN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB38 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB38 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB38 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_113)
  {
      // BB39;BB39;1106 116E 11AC;BB39;1106 116E 11AC; 
      // (묹; 묹; 묹; 묹; 묹; ) HANGUL SYLLABLE MUNJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB39 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB39 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB39 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_114)
  {
      // BB3A;BB3A;1106 116E 11AD;BB3A;1106 116E 11AD; 
      // (묺; 묺; 묺; 묺; 묺; ) HANGUL SYLLABLE MUNH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_115)
  {
      // BB3B;BB3B;1106 116E 11AE;BB3B;1106 116E 11AE; 
      // (묻; 묻; 묻; 묻; 묻; ) HANGUL SYLLABLE MUD
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_116)
  {
      // BB3C;BB3C;1106 116E 11AF;BB3C;1106 116E 11AF; 
      // (물; 물; 물; 물; 물; ) HANGUL SYLLABLE MUL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_117)
  {
      // BB3D;BB3D;1106 116E 11B0;BB3D;1106 116E 11B0; 
      // (묽; 묽; 묽; 묽; 묽; ) HANGUL SYLLABLE MULG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_118)
  {
      // BB3E;BB3E;1106 116E 11B1;BB3E;1106 116E 11B1; 
      // (묾; 묾; 묾; 묾; 묾; ) HANGUL SYLLABLE MULM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_119)
  {
      // BB3F;BB3F;1106 116E 11B2;BB3F;1106 116E 11B2; 
      // (묿; 묿; 묿; 묿; 묿; ) HANGUL SYLLABLE MULB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB3F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB3F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB3F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_120)
  {
      // BB40;BB40;1106 116E 11B3;BB40;1106 116E 11B3; 
      // (뭀; 뭀; 뭀; 뭀; 뭀; ) HANGUL SYLLABLE MULS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB40 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB40 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB40 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_121)
  {
      // BB41;BB41;1106 116E 11B4;BB41;1106 116E 11B4; 
      // (뭁; 뭁; 뭁; 뭁; 뭁; ) HANGUL SYLLABLE MULT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB41 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB41 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB41 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_122)
  {
      // BB42;BB42;1106 116E 11B5;BB42;1106 116E 11B5; 
      // (뭂; 뭂; 뭂; 뭂; 뭂; ) HANGUL SYLLABLE MULP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB42 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB42 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB42 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_123)
  {
      // BB43;BB43;1106 116E 11B6;BB43;1106 116E 11B6; 
      // (뭃; 뭃; 뭃; 뭃; 뭃; ) HANGUL SYLLABLE MULH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB43 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB43 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB43 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_124)
  {
      // BB44;BB44;1106 116E 11B7;BB44;1106 116E 11B7; 
      // (뭄; 뭄; 뭄; 뭄; 뭄; ) HANGUL SYLLABLE MUM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB44 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB44 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB44 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_125)
  {
      // BB45;BB45;1106 116E 11B8;BB45;1106 116E 11B8; 
      // (뭅; 뭅; 뭅; 뭅; 뭅; ) HANGUL SYLLABLE MUB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB45 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB45 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB45 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_126)
  {
      // BB46;BB46;1106 116E 11B9;BB46;1106 116E 11B9; 
      // (뭆; 뭆; 뭆; 뭆; 뭆; ) HANGUL SYLLABLE MUBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB46 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB46 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB46 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_127)
  {
      // BB47;BB47;1106 116E 11BA;BB47;1106 116E 11BA; 
      // (뭇; 뭇; 뭇; 뭇; 뭇; ) HANGUL SYLLABLE MUS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB47 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB47 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB47 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_128)
  {
      // BB48;BB48;1106 116E 11BB;BB48;1106 116E 11BB; 
      // (뭈; 뭈; 뭈; 뭈; 뭈; ) HANGUL SYLLABLE MUSS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB48 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB48 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB48 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_129)
  {
      // BB49;BB49;1106 116E 11BC;BB49;1106 116E 11BC; 
      // (뭉; 뭉; 뭉; 뭉; 뭉; ) HANGUL SYLLABLE MUNG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB49 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB49 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB49 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_130)
  {
      // BB4A;BB4A;1106 116E 11BD;BB4A;1106 116E 11BD; 
      // (뭊; 뭊; 뭊; 뭊; 뭊; ) HANGUL SYLLABLE MUJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_131)
  {
      // BB4B;BB4B;1106 116E 11BE;BB4B;1106 116E 11BE; 
      // (뭋; 뭋; 뭋; 뭋; 뭋; ) HANGUL SYLLABLE MUC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_132)
  {
      // BB4C;BB4C;1106 116E 11BF;BB4C;1106 116E 11BF; 
      // (뭌; 뭌; 뭌; 뭌; 뭌; ) HANGUL SYLLABLE MUK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_133)
  {
      // BB4D;BB4D;1106 116E 11C0;BB4D;1106 116E 11C0; 
      // (뭍; 뭍; 뭍; 뭍; 뭍; ) HANGUL SYLLABLE MUT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_134)
  {
      // BB4E;BB4E;1106 116E 11C1;BB4E;1106 116E 11C1; 
      // (뭎; 뭎; 뭎; 뭎; 뭎; ) HANGUL SYLLABLE MUP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_135)
  {
      // BB4F;BB4F;1106 116E 11C2;BB4F;1106 116E 11C2; 
      // (뭏; 뭏; 뭏; 뭏; 뭏; ) HANGUL SYLLABLE MUH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB4F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB4F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116E, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB4F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116E, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_136)
  {
      // BB50;BB50;1106 116F;BB50;1106 116F; 
      // (뭐; 뭐; 뭐; 뭐; 뭐; ) HANGUL SYLLABLE MWEO
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB50 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB50 }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x116F }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB50 }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x116F }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_137)
  {
      // BB51;BB51;1106 116F 11A8;BB51;1106 116F 11A8; 
      // (뭑; 뭑; 뭑; 뭑; 뭑; ) HANGUL SYLLABLE MWEOG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB51 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB51 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB51 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_138)
  {
      // BB52;BB52;1106 116F 11A9;BB52;1106 116F 11A9; 
      // (뭒; 뭒; 뭒; 뭒; 뭒; ) HANGUL SYLLABLE MWEOGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB52 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB52 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB52 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_139)
  {
      // BB53;BB53;1106 116F 11AA;BB53;1106 116F 11AA; 
      // (뭓; 뭓; 뭓; 뭓; 뭓; ) HANGUL SYLLABLE MWEOGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB53 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB53 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB53 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_140)
  {
      // BB54;BB54;1106 116F 11AB;BB54;1106 116F 11AB; 
      // (뭔; 뭔; 뭔; 뭔; 뭔; ) HANGUL SYLLABLE MWEON
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB54 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB54 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB54 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_141)
  {
      // BB55;BB55;1106 116F 11AC;BB55;1106 116F 11AC; 
      // (뭕; 뭕; 뭕; 뭕; 뭕; ) HANGUL SYLLABLE MWEONJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB55 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB55 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB55 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_142)
  {
      // BB56;BB56;1106 116F 11AD;BB56;1106 116F 11AD; 
      // (뭖; 뭖; 뭖; 뭖; 뭖; ) HANGUL SYLLABLE MWEONH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB56 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB56 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB56 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_143)
  {
      // BB57;BB57;1106 116F 11AE;BB57;1106 116F 11AE; 
      // (뭗; 뭗; 뭗; 뭗; 뭗; ) HANGUL SYLLABLE MWEOD
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB57 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB57 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB57 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_144)
  {
      // BB58;BB58;1106 116F 11AF;BB58;1106 116F 11AF; 
      // (뭘; 뭘; 뭘; 뭘; 뭘; ) HANGUL SYLLABLE MWEOL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB58 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB58 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB58 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_145)
  {
      // BB59;BB59;1106 116F 11B0;BB59;1106 116F 11B0; 
      // (뭙; 뭙; 뭙; 뭙; 뭙; ) HANGUL SYLLABLE MWEOLG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB59 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB59 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB59 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_146)
  {
      // BB5A;BB5A;1106 116F 11B1;BB5A;1106 116F 11B1; 
      // (뭚; 뭚; 뭚; 뭚; 뭚; ) HANGUL SYLLABLE MWEOLM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_147)
  {
      // BB5B;BB5B;1106 116F 11B2;BB5B;1106 116F 11B2; 
      // (뭛; 뭛; 뭛; 뭛; 뭛; ) HANGUL SYLLABLE MWEOLB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_148)
  {
      // BB5C;BB5C;1106 116F 11B3;BB5C;1106 116F 11B3; 
      // (뭜; 뭜; 뭜; 뭜; 뭜; ) HANGUL SYLLABLE MWEOLS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_149)
  {
      // BB5D;BB5D;1106 116F 11B4;BB5D;1106 116F 11B4; 
      // (뭝; 뭝; 뭝; 뭝; 뭝; ) HANGUL SYLLABLE MWEOLT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_150)
  {
      // BB5E;BB5E;1106 116F 11B5;BB5E;1106 116F 11B5; 
      // (뭞; 뭞; 뭞; 뭞; 뭞; ) HANGUL SYLLABLE MWEOLP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_151)
  {
      // BB5F;BB5F;1106 116F 11B6;BB5F;1106 116F 11B6; 
      // (뭟; 뭟; 뭟; 뭟; 뭟; ) HANGUL SYLLABLE MWEOLH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB5F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB5F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB5F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_152)
  {
      // BB60;BB60;1106 116F 11B7;BB60;1106 116F 11B7; 
      // (뭠; 뭠; 뭠; 뭠; 뭠; ) HANGUL SYLLABLE MWEOM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB60 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB60 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB60 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_153)
  {
      // BB61;BB61;1106 116F 11B8;BB61;1106 116F 11B8; 
      // (뭡; 뭡; 뭡; 뭡; 뭡; ) HANGUL SYLLABLE MWEOB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB61 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB61 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB61 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_154)
  {
      // BB62;BB62;1106 116F 11B9;BB62;1106 116F 11B9; 
      // (뭢; 뭢; 뭢; 뭢; 뭢; ) HANGUL SYLLABLE MWEOBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB62 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB62 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB62 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_155)
  {
      // BB63;BB63;1106 116F 11BA;BB63;1106 116F 11BA; 
      // (뭣; 뭣; 뭣; 뭣; 뭣; ) HANGUL SYLLABLE MWEOS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB63 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB63 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB63 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_156)
  {
      // BB64;BB64;1106 116F 11BB;BB64;1106 116F 11BB; 
      // (뭤; 뭤; 뭤; 뭤; 뭤; ) HANGUL SYLLABLE MWEOSS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB64 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB64 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB64 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_157)
  {
      // BB65;BB65;1106 116F 11BC;BB65;1106 116F 11BC; 
      // (뭥; 뭥; 뭥; 뭥; 뭥; ) HANGUL SYLLABLE MWEONG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB65 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB65 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB65 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_158)
  {
      // BB66;BB66;1106 116F 11BD;BB66;1106 116F 11BD; 
      // (뭦; 뭦; 뭦; 뭦; 뭦; ) HANGUL SYLLABLE MWEOJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB66 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB66 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB66 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_159)
  {
      // BB67;BB67;1106 116F 11BE;BB67;1106 116F 11BE; 
      // (뭧; 뭧; 뭧; 뭧; 뭧; ) HANGUL SYLLABLE MWEOC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB67 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB67 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB67 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_160)
  {
      // BB68;BB68;1106 116F 11BF;BB68;1106 116F 11BF; 
      // (뭨; 뭨; 뭨; 뭨; 뭨; ) HANGUL SYLLABLE MWEOK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB68 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB68 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB68 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_161)
  {
      // BB69;BB69;1106 116F 11C0;BB69;1106 116F 11C0; 
      // (뭩; 뭩; 뭩; 뭩; 뭩; ) HANGUL SYLLABLE MWEOT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB69 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB69 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB69 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_162)
  {
      // BB6A;BB6A;1106 116F 11C1;BB6A;1106 116F 11C1; 
      // (뭪; 뭪; 뭪; 뭪; 뭪; ) HANGUL SYLLABLE MWEOP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_163)
  {
      // BB6B;BB6B;1106 116F 11C2;BB6B;1106 116F 11C2; 
      // (뭫; 뭫; 뭫; 뭫; 뭫; ) HANGUL SYLLABLE MWEOH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x116F, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x116F, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_164)
  {
      // BB6C;BB6C;1106 1170;BB6C;1106 1170; 
      // (뭬; 뭬; 뭬; 뭬; 뭬; ) HANGUL SYLLABLE MWE
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6C }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x1170 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6C }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x1170 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_165)
  {
      // BB6D;BB6D;1106 1170 11A8;BB6D;1106 1170 11A8; 
      // (뭭; 뭭; 뭭; 뭭; 뭭; ) HANGUL SYLLABLE MWEG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_166)
  {
      // BB6E;BB6E;1106 1170 11A9;BB6E;1106 1170 11A9; 
      // (뭮; 뭮; 뭮; 뭮; 뭮; ) HANGUL SYLLABLE MWEGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_167)
  {
      // BB6F;BB6F;1106 1170 11AA;BB6F;1106 1170 11AA; 
      // (뭯; 뭯; 뭯; 뭯; 뭯; ) HANGUL SYLLABLE MWEGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB6F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB6F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB6F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_168)
  {
      // BB70;BB70;1106 1170 11AB;BB70;1106 1170 11AB; 
      // (뭰; 뭰; 뭰; 뭰; 뭰; ) HANGUL SYLLABLE MWEN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB70 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB70 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB70 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_169)
  {
      // BB71;BB71;1106 1170 11AC;BB71;1106 1170 11AC; 
      // (뭱; 뭱; 뭱; 뭱; 뭱; ) HANGUL SYLLABLE MWENJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB71 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB71 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB71 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_170)
  {
      // BB72;BB72;1106 1170 11AD;BB72;1106 1170 11AD; 
      // (뭲; 뭲; 뭲; 뭲; 뭲; ) HANGUL SYLLABLE MWENH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB72 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB72 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB72 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_171)
  {
      // BB73;BB73;1106 1170 11AE;BB73;1106 1170 11AE; 
      // (뭳; 뭳; 뭳; 뭳; 뭳; ) HANGUL SYLLABLE MWED
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB73 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB73 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB73 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_172)
  {
      // BB74;BB74;1106 1170 11AF;BB74;1106 1170 11AF; 
      // (뭴; 뭴; 뭴; 뭴; 뭴; ) HANGUL SYLLABLE MWEL
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB74 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB74 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11AF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB74 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11AF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_173)
  {
      // BB75;BB75;1106 1170 11B0;BB75;1106 1170 11B0; 
      // (뭵; 뭵; 뭵; 뭵; 뭵; ) HANGUL SYLLABLE MWELG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB75 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB75 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB75 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_174)
  {
      // BB76;BB76;1106 1170 11B1;BB76;1106 1170 11B1; 
      // (뭶; 뭶; 뭶; 뭶; 뭶; ) HANGUL SYLLABLE MWELM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB76 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB76 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB76 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_175)
  {
      // BB77;BB77;1106 1170 11B2;BB77;1106 1170 11B2; 
      // (뭷; 뭷; 뭷; 뭷; 뭷; ) HANGUL SYLLABLE MWELB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB77 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB77 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB77 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_176)
  {
      // BB78;BB78;1106 1170 11B3;BB78;1106 1170 11B3; 
      // (뭸; 뭸; 뭸; 뭸; 뭸; ) HANGUL SYLLABLE MWELS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB78 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB78 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B3 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB78 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B3 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_177)
  {
      // BB79;BB79;1106 1170 11B4;BB79;1106 1170 11B4; 
      // (뭹; 뭹; 뭹; 뭹; 뭹; ) HANGUL SYLLABLE MWELT
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB79 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB79 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B4 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB79 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B4 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_178)
  {
      // BB7A;BB7A;1106 1170 11B5;BB7A;1106 1170 11B5; 
      // (뭺; 뭺; 뭺; 뭺; 뭺; ) HANGUL SYLLABLE MWELP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B5 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B5 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_179)
  {
      // BB7B;BB7B;1106 1170 11B6;BB7B;1106 1170 11B6; 
      // (뭻; 뭻; 뭻; 뭻; 뭻; ) HANGUL SYLLABLE MWELH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B6 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B6 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_180)
  {
      // BB7C;BB7C;1106 1170 11B7;BB7C;1106 1170 11B7; 
      // (뭼; 뭼; 뭼; 뭼; 뭼; ) HANGUL SYLLABLE MWEM
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B7 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B7 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_181)
  {
      // BB7D;BB7D;1106 1170 11B8;BB7D;1106 1170 11B8; 
      // (뭽; 뭽; 뭽; 뭽; 뭽; ) HANGUL SYLLABLE MWEB
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_182)
  {
      // BB7E;BB7E;1106 1170 11B9;BB7E;1106 1170 11B9; 
      // (뭾; 뭾; 뭾; 뭾; 뭾; ) HANGUL SYLLABLE MWEBS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11B9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11B9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_183)
  {
      // BB7F;BB7F;1106 1170 11BA;BB7F;1106 1170 11BA; 
      // (뭿; 뭿; 뭿; 뭿; 뭿; ) HANGUL SYLLABLE MWES
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB7F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB7F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB7F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_184)
  {
      // BB80;BB80;1106 1170 11BB;BB80;1106 1170 11BB; 
      // (뮀; 뮀; 뮀; 뮀; 뮀; ) HANGUL SYLLABLE MWESS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB80 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB80 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB80 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_185)
  {
      // BB81;BB81;1106 1170 11BC;BB81;1106 1170 11BC; 
      // (뮁; 뮁; 뮁; 뮁; 뮁; ) HANGUL SYLLABLE MWENG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB81 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB81 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB81 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_186)
  {
      // BB82;BB82;1106 1170 11BD;BB82;1106 1170 11BD; 
      // (뮂; 뮂; 뮂; 뮂; 뮂; ) HANGUL SYLLABLE MWEJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB82 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB82 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB82 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_187)
  {
      // BB83;BB83;1106 1170 11BE;BB83;1106 1170 11BE; 
      // (뮃; 뮃; 뮃; 뮃; 뮃; ) HANGUL SYLLABLE MWEC
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB83 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB83 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB83 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_188)
  {
      // BB84;BB84;1106 1170 11BF;BB84;1106 1170 11BF; 
      // (뮄; 뮄; 뮄; 뮄; 뮄; ) HANGUL SYLLABLE MWEK
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB84 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB84 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11BF }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB84 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11BF }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_189)
  {
      // BB85;BB85;1106 1170 11C0;BB85;1106 1170 11C0; 
      // (뮅; 뮅; 뮅; 뮅; 뮅; ) HANGUL SYLLABLE MWET
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB85 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB85 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11C0 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB85 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11C0 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_190)
  {
      // BB86;BB86;1106 1170 11C1;BB86;1106 1170 11C1; 
      // (뮆; 뮆; 뮆; 뮆; 뮆; ) HANGUL SYLLABLE MWEP
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB86 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB86 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11C1 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB86 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11C1 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_191)
  {
      // BB87;BB87;1106 1170 11C2;BB87;1106 1170 11C2; 
      // (뮇; 뮇; 뮇; 뮇; 뮇; ) HANGUL SYLLABLE MWEH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB87 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB87 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1170, 0x11C2 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB87 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1170, 0x11C2 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_192)
  {
      // BB88;BB88;1106 1171;BB88;1106 1171; 
      // (뮈; 뮈; 뮈; 뮈; 뮈; ) HANGUL SYLLABLE MWI
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB88 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB88 }};
          std::array<uint32_t, 2> const c3 = {{ 0x1106, 0x1171 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB88 }};
          std::array<uint32_t, 2> const c5 = {{ 0x1106, 0x1171 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_193)
  {
      // BB89;BB89;1106 1171 11A8;BB89;1106 1171 11A8; 
      // (뮉; 뮉; 뮉; 뮉; 뮉; ) HANGUL SYLLABLE MWIG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB89 }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB89 }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11A8 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB89 }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11A8 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_194)
  {
      // BB8A;BB8A;1106 1171 11A9;BB8A;1106 1171 11A9; 
      // (뮊; 뮊; 뮊; 뮊; 뮊; ) HANGUL SYLLABLE MWIGG
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8A }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8A }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11A9 }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8A }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11A9 }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_195)
  {
      // BB8B;BB8B;1106 1171 11AA;BB8B;1106 1171 11AA; 
      // (뮋; 뮋; 뮋; 뮋; 뮋; ) HANGUL SYLLABLE MWIGS
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8B }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8B }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11AA }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8B }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11AA }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_196)
  {
      // BB8C;BB8C;1106 1171 11AB;BB8C;1106 1171 11AB; 
      // (뮌; 뮌; 뮌; 뮌; 뮌; ) HANGUL SYLLABLE MWIN
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8C }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8C }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11AB }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8C }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11AB }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_197)
  {
      // BB8D;BB8D;1106 1171 11AC;BB8D;1106 1171 11AC; 
      // (뮍; 뮍; 뮍; 뮍; 뮍; ) HANGUL SYLLABLE MWINJ
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8D }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8D }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11AC }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8D }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11AC }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_198)
  {
      // BB8E;BB8E;1106 1171 11AD;BB8E;1106 1171 11AD; 
      // (뮎; 뮎; 뮎; 뮎; 뮎; ) HANGUL SYLLABLE MWINH
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8E }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8E }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11AD }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8E }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11AD }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  TEST(normalization, nfc_031_199)
  {
      // BB8F;BB8F;1106 1171 11AE;BB8F;1106 1171 11AE; 
      // (뮏; 뮏; 뮏; 뮏; 뮏; ) HANGUL SYLLABLE MWID
      {
          std::array<uint32_t, 1> const c1 = {{ 0xBB8F }};
          std::array<uint32_t, 1> const c2 = {{ 0xBB8F }};
          std::array<uint32_t, 3> const c3 = {{ 0x1106, 0x1171, 0x11AE }};
          std::array<uint32_t, 1> const c4 = {{ 0xBB8F }};
          std::array<uint32_t, 3> const c5 = {{ 0x1106, 0x1171, 0x11AE }};
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c2.begin(), c2.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c2.begin(), c2.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c3.begin(), c3.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c3.begin(), c3.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::c>(c4.begin(), c4.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kc>(c4.begin(), c4.end()));
  
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::d>(c5.begin(), c5.end()));
          EXPECT_TRUE(boost::text::normalized<boost::text::nf::kd>(c5.begin(), c5.end()));
  
  
  
          {
              std::string str = boost::text::to_string(c1.begin(), c1.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c2.begin(), c2.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c3.begin(), c3.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c2.size());
              auto c2_it = c2.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c2_it) << "iteration " << i;
                  ++c2_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c4.begin(), c4.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
          {
              std::string str = boost::text::to_string(c5.begin(), c5.end());
              boost::text::normalize<boost::text::nf::c>(str);
              auto const r = boost::text::as_utf32(str);
              EXPECT_EQ(std::distance(r.begin(), r.end()), (std::ptrdiff_t)c4.size());
              auto c4_it = c4.begin();
              int i = 0;
              for (auto x : r) {
                  EXPECT_EQ(x, *c4_it) << "iteration " << i;
                  ++c4_it;
                  ++i;
              }
          }
  
      }
  }
  
  
  