Make replaced with Meson

This commit is contained in:
2026-01-13 12:53:08 +03:00
parent 2cd45c0750
commit 30a77478dc
21 changed files with 239 additions and 415 deletions

29
test/Exception.cpp Normal file
View File

@ -0,0 +1,29 @@
#include <basen/Exception.hpp>
#include <gtest/gtest.h>
TEST(Exception, Exception)
{
EXPECT_ANY_THROW(throw basen::Exception(basen::Exception::Code::BASE));
}
TEST(Exception, message)
{
try
{
throw basen::Exception(basen::Exception::Code::BASE);
}
catch (const basen::Exception &e)
{
EXPECT_STREQ(e.message(), "incorrect base");
}
}
TEST(Exception, code)
{
try
{
throw basen::Exception(basen::Exception::Code::BASE);
}
catch (const basen::Exception &e)
{
EXPECT_EQ(uint32_t(e.code()), uint32_t(basen::Exception::Code::BASE));
}
}