From 743f77d3161676c9c62ac648d8d85fac93da6259 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 10 Mar 2018 13:45:40 +0000 Subject: Tighten error handling --- service/test.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'service/test.cpp') diff --git a/service/test.cpp b/service/test.cpp index 979d43d..5be34e7 100644 --- a/service/test.cpp +++ b/service/test.cpp @@ -50,7 +50,17 @@ BOOST_AUTO_TEST_CASE(getServices) BOOST_AUTO_TEST_CASE(getMatches_failure) { - BOOST_REQUIRE_THROW(s->getMatches("no.fixture"), MirrorSearch::XmlError); + BOOST_REQUIRE_THROW(s->getMatches("no.fixture"), MirrorSearch::CurlError); +} + +BOOST_AUTO_TEST_CASE(getMatches_empty_response) +{ + BOOST_REQUIRE_THROW(s->getMatches("empty"), MirrorSearch::CurlError); +} + +BOOST_AUTO_TEST_CASE(getMatches_not_html) +{ + BOOST_REQUIRE_THROW(s->getMatches("not"), MirrorSearch::XmlError); } BOOST_AUTO_TEST_CASE(getMatches_zstd_notfound) -- cgit v1.2.3