fix: failing tests in test.tests.cpp
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
light7734 2025-07-16 13:20:36 +03:30
parent f457e5ae19
commit c4b9bd8359
Signed by: light7734
GPG key ID: 8C30176798F1A6BA

View file

@ -2,6 +2,7 @@
lt::test::Suite meta = []() { lt::test::Suite meta = []() {
using lt::test::expect_eq; using lt::test::expect_eq;
using lt::test::expect_true;
lt::test::Case { "test_1" } = [] { lt::test::Case { "test_1" } = [] {
expect_eq(5, 5); expect_eq(5, 5);
@ -12,7 +13,18 @@ lt::test::Suite meta = []() {
}; };
lt::test::Case { "test_3" } = [] { 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" } = [] { lt::test::Case { "test_4" } = [] {
@ -20,6 +32,5 @@ lt::test::Suite meta = []() {
}; };
lt::test::Case { "test_5" } = [] { lt::test::Case { "test_5" } = [] {
throw std::runtime_error("Uncaught std exception!");
}; };
}; };