#include <random>
#include <string>
#define CATCH_CONFIG_MAIN
#include <catch2/catch_test_macros.hpp>
thread_local std::mt19937 g_rng{std::random_device{"/dev/urandom"}()};
TEST_CASE("Empty relation", "[Z]")
{
std::uniform_int_distribution<unsigned> gen{0,255};
for (int i = 0; i < 10; ++i)
REQUIRE(!po.
related((
unsigned char)gen(g_rng), (
unsigned char)gen(g_rng)));
}
TEST_CASE("One relation", "[O][I]")
{
}
TEST_CASE("Multiple relations", "[M][I][B]")
{
size_t count = 0;
REQUIRE(count == 4);
count = 0;
REQUIRE(count == 3);
for (char i = 'a'; i <= 'e'; ++i)
}
TEST_CASE("Boundary checking", "[B]")
{
size_t count = 0;
REQUIRE(count == 0);
count = 0;
REQUIRE(count == 0);
}
TEST_CASE("Interface", "[I]")
{
}
TEST_CASE("Scenario: Calling makeLinear() method", "[S][I]")
{
std::string out_breadth1st;
REQUIRE(out_breadth1st == "abcdefg");
std::string out_depth1st;
REQUIRE(out_depth1st == "abdecfg");
std::string out_default;
REQUIRE(out_default == out_breadth1st);
}
void makeLinear(F apply, E_MakeLinearPolicy policy=MLP_BREADTH_FIRST) const
bool anyLeft(const T2 &R) const
void getRelated(T2 L, F R, std::size_t maxDepth=0) const
std::size_t depthToLeft(T t) const
bool related(const T &a, const T &b) const
bool anyRight(const T2 &L) const
bool addOrder(T1 a, T2 b)