summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-07 23:49:36 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-07 23:51:38 +0100
commitb76ad768ceddc2777044d0f7128d292332a75353 (patch)
treea4f663b5c5d15c47b4f72eccbf93c66bf31c0396
parentAdd helper for iterating over a range defined by a pair of iterators (diff)
downloadilt-b76ad768ceddc2777044d0f7128d292332a75353.tar.bz2
ilt-b76ad768ceddc2777044d0f7128d292332a75353.tar.xz
ilt-b76ad768ceddc2777044d0f7128d292332a75353.zip
Add timeouts to asset factory tests
Yes, I made some infinite loops a few times
-rw-r--r--test/test-assetFactory.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-assetFactory.cpp b/test/test-assetFactory.cpp
index d71fa9b..54168aa 100644
--- a/test/test-assetFactory.cpp
+++ b/test/test-assetFactory.cpp
@@ -68,7 +68,7 @@ private:
};
BOOST_FIXTURE_TEST_SUITE(m, FactoryFixture);
-BOOST_AUTO_TEST_CASE(brush47xml)
+BOOST_AUTO_TEST_CASE(brush47xml, *boost::unit_test::timeout(5))
{
auto mf = AssetFactory::loadXML(RESDIR "/brush47.xml");
BOOST_REQUIRE(mf);
@@ -118,7 +118,7 @@ BOOST_DATA_TEST_CASE(normalizeColourName,
BOOST_CHECK_EQUAL(in, exp);
}
-BOOST_AUTO_TEST_CASE(parseX11RGB)
+BOOST_AUTO_TEST_CASE(parseX11RGB, *boost::unit_test::timeout(5))
{
const auto parsedColours = AssetFactory::parseX11RGB(FIXTURESDIR "rgb.txt");
BOOST_REQUIRE_EQUAL(parsedColours.size(), 20);
@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE(parseX11RGB)
BOOST_CHECK_CLOSE_VEC(parsedColours.at("lightsteelblue1"), AssetFactory::Colour(0.79, 0.88, 1));
}
-BOOST_AUTO_TEST_CASE(texturePacker)
+BOOST_AUTO_TEST_CASE(texturePacker, *boost::unit_test::timeout(5))
{
std::vector<TexturePacker::Image> input {
{10, 10},