This commit is contained in:
Julian Brost 2026-05-05 17:00:55 +02:00
parent f50f6ec88f
commit ef4b06e04d
2 changed files with 12 additions and 4 deletions

View file

@ -1,10 +1,7 @@
name: Linux
on:
push:
branches:
- master
- 'support/*'
push: {}
pull_request: {}
concurrency:

View file

@ -8,6 +8,7 @@
#include "base/generator.hpp"
#include "base/objectlock.hpp"
#include "base/json.hpp"
#include "base/workqueue.hpp"
#include <boost/algorithm/string/replace.hpp>
#include <BoostTestTargetConfig.h>
#include <limits>
@ -151,4 +152,14 @@ BOOST_AUTO_TEST_CASE(invalid1)
BOOST_CHECK_THROW(JsonDecode("{\"test\": \"test\""), std::exception);
}
BOOST_AUTO_TEST_CASE(fail_in_workqueue)
{
WorkQueue q;
//q.Enqueue([](){ JsonDecode(":)"); });
q.Enqueue([](){ throw std::invalid_argument("wtf"); });
q.Join();
BOOST_CHECK(q.HasExceptions());
BOOST_CHECK_EQUAL(q.GetExceptions().size(), 1);
}
BOOST_AUTO_TEST_SUITE_END()