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/collation_table.hpp>
  #include <boost/text/collate.hpp>
  #include <boost/text/data/all.hpp>
  
  #ifndef LIMIT_TESTING_FOR_CI
  #include <boost/text/save_load_table.hpp>
  
  #include <boost/filesystem.hpp>
  #endif
  
  #include <gtest/gtest.h>
  
  using namespace boost::text;
  
  auto const error = [](std::string const & s) { std::cout << s; };
  auto const warning = [](std::string const & s) {};
  
  collation_table make_save_load_table()
  {
  #ifdef LIMIT_TESTING_FOR_CI
      std::string const table_str(data::ro::standard_collation_tailoring());
      return tailored_collation_table(
          table_str,
          "ro::standard_collation_tailoring()", error, warning);
  #else
      if (!exists(boost::filesystem::path("ro_standard.table"))) {
          std::string const table_str(data::ro::standard_collation_tailoring());
          collation_table table = tailored_collation_table(
              table_str,
              "ro::standard_collation_tailoring()", error, warning);
          save_table(table, "ro_standard.table.0");
          boost::filesystem::rename("ro_standard.table.0", "ro_standard.table");
      }
      return load_table("ro_standard.table");
  #endif
  }
  collation_table const & table()
  {
      static collation_table retval = make_save_load_table();
      return retval;
  }
  TEST(tailoring, ro_standard_000_001)
  {
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0041);
      auto const rel = std::vector<uint32_t>(1, 0x0103);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::primary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::primary),
          -1);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0103);
      auto const rel = std::vector<uint32_t>(1, 0x0102);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::tertiary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::tertiary),
          -1);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::secondary),
          0);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::secondary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0102);
      auto const rel = std::vector<uint32_t>(1, 0x00e2);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::primary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::primary),
          -1);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x00e2);
      auto const rel = std::vector<uint32_t>(1, 0x00c2);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::tertiary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::tertiary),
          -1);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::secondary),
          0);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::secondary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0049);
      auto const rel = std::vector<uint32_t>(1, 0x00ee);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::primary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::primary),
          -1);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x00ee);
      auto const rel = std::vector<uint32_t>(1, 0x00ce);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::tertiary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::tertiary),
          -1);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::secondary),
          0);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::secondary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0053);
      auto const rel = std::vector<uint32_t>(1, 0x015f);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::primary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::primary),
          -1);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x015f);
      auto const rel = std::vector<uint32_t>(1, 0x0219);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::quaternary),
          0);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::quaternary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0219);
      auto const rel = std::vector<uint32_t>(1, 0x015e);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::tertiary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::tertiary),
          -1);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::secondary),
          0);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::secondary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x015e);
      auto const rel = std::vector<uint32_t>(1, 0x0218);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::quaternary),
          0);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::quaternary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0054);
      auto const rel = std::vector<uint32_t>(1, 0x0163);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::primary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::primary),
          -1);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0163);
      auto const rel = std::vector<uint32_t>(1, 0x021b);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::quaternary),
          0);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::quaternary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x021b);
      auto const rel = std::vector<uint32_t>(1, 0x0162);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::tertiary),
          -1);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::tertiary),
          -1);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::secondary),
          0);
      // equal to preceeding cps at next-lower strength
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::secondary),
          0);
      }
      {
      // greater than (or equal to, for =) preceeding cps
      auto const res = std::vector<uint32_t>(1, 0x0162);
      auto const rel = std::vector<uint32_t>(1, 0x021a);
      std::string const res_str = to_string(res);
      std::string const rel_str = to_string(rel);
      auto const res_view = as_utf32(res);
      auto const rel_view = as_utf32(rel);
      EXPECT_EQ(collate(
          res.begin(), res.end(),
          rel.begin(), rel.end(),
          table(), collation_strength::quaternary),
          0);
      EXPECT_EQ(collate(
          res_view.begin(), res_view.end(),
          rel_view.begin(), rel_view.end(),
          table(), collation_strength::quaternary),
          0);
      }
  }
  