fix: failing tests in test.tests.cpp
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
f457e5ae19
commit
c4b9bd8359
1 changed files with 13 additions and 2 deletions
|
@ -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!");
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue