#include #include using namespace kpn; TEST_CASE("fixed_string equality", "[fixed_string]") { constexpr fixed_string a("img"); constexpr fixed_string b("img"); constexpr fixed_string c("sigma"); STATIC_REQUIRE(a == b); STATIC_REQUIRE(!(a == c)); } TEST_CASE("fixed_string view", "[fixed_string]") { constexpr fixed_string s("hello"); REQUIRE(s.view() == "hello"); } TEST_CASE("index_of hit", "[fixed_string]") { constexpr auto idx = index_of(); STATIC_REQUIRE(idx == 1); } TEST_CASE("index_of miss returns npos", "[fixed_string]") { constexpr auto idx = index_of(); STATIC_REQUIRE(idx == npos); }