From 66b0217fe50226ce0e62e312e493c2da736ac66e Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Sat, 30 Jul 2022 17:31:03 +0200 Subject: [PATCH] tests: svgAnalyzer: add throwing of exceptions for unimplemented attributes --- tests/svgpp_context.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/tests/svgpp_context.cpp b/tests/svgpp_context.cpp index d7127cbed..11f457e4f 100644 --- a/tests/svgpp_context.cpp +++ b/tests/svgpp_context.cpp @@ -152,9 +152,8 @@ void SvgppContext::transform_matrix(const boost::array &matrix) { m_svgAnalyzer->set_transform(a, b, c, d, e, f); } -void SvgppContext::set(svgpp::tag::attribute::r a, const double v) { - (void)a; - (void)v; +void SvgppContext::set(svgpp::tag::attribute::r, const double) { + throw std::runtime_error{"the 'r' attribute is not yet implemented"}; } void SvgppContext::set(svgpp::tag::attribute::rx, const double v) { @@ -165,24 +164,20 @@ void SvgppContext::set(svgpp::tag::attribute::ry, const double v) { m_svgAnalyzer->set_ry(v); } -void SvgppContext::set(svgpp::tag::attribute::x1 a, const double v) { - (void)a; - (void)v; +void SvgppContext::set(svgpp::tag::attribute::x1, const double) { + throw std::runtime_error{"the 'x1' attribute is not yet implemented"}; } -void SvgppContext::set(svgpp::tag::attribute::y1 a, const double v) { - (void)a; - (void)v; +void SvgppContext::set(svgpp::tag::attribute::y1, const double) { + throw std::runtime_error{"the 'y1' attribute is not yet implemented"}; } -void SvgppContext::set(svgpp::tag::attribute::x2 a, const double v) { - (void)a; - (void)v; +void SvgppContext::set(svgpp::tag::attribute::x2, const double) { + throw std::runtime_error{"the 'x2' attribute is not yet implemented"}; } -void SvgppContext::set(svgpp::tag::attribute::y2 a, const double v) { - (void)a; - (void)v; +void SvgppContext::set(svgpp::tag::attribute::y2, const double) { + throw std::runtime_error{"the 'y2' attribute is not yet implemented"}; } void SvgppContext::set(svgpp::tag::attribute::x, const double v) { -- 2.40.0