first commit

This commit is contained in:
stuce-bot 2025-06-30 20:47:33 +02:00
commit 5893b00dd2
1669 changed files with 1982740 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#include <gtest/gtest.h>
// #include <stdexcept>
// #define TL_ASSERT(cond) if (!(cond)) { throw std::runtime_error(std::string("assertion failure")); }
#include <m5_utility/stl/expected.hpp>
#if 0
TEST(Expected, Assertions) {
m5::stl::expected<int,int> o1 = 42;
EXPECT_ANY_THROW(o1.error());
m5::stl::expected<int,int> o2 {m5::stl::unexpect, 0};
EXPECT_ANY_THROW(*o2);
struct foo { int bar; };
m5::stl::expected<struct foo,int> o3 {m5::stl::unexpect, 0};
EXPECT_ANY_THROW(o3->bar);
}
#endif