ci: add unit tests check #4

Merged
light7734 merged 8 commits from ci/unit-tests into main 2025-07-16 09:55:16 +00:00
Showing only changes of commit c4b9bd8359 - Show all commits

View file

@ -2,6 +2,7 @@
lt::test::Suite meta = []() {
using lt::test::expect_eq;
using lt::test::expect_true;
lt::test::Case { "test_1" } = [] {
expect_eq(5, 5);
@ -12,7 +13,18 @@ lt::test::Suite meta = []() {
};
lt::test::Case { "test_3" } = [] {
expect_eq(true, false);
auto exception_thrown = false;
try
{
expect_eq(true, false);
}
catch (const std::exception &exp)
{
exception_thrown = true;
}
expect_true(exception_thrown);
};
lt::test::Case { "test_4" } = [] {
@ -20,6 +32,5 @@ lt::test::Suite meta = []() {
};
lt::test::Case { "test_5" } = [] {
throw std::runtime_error("Uncaught std exception!");
};
};