]> granicus.if.org Git - graphviz/commitdiff
tests: svgAnalyzer: add throwing of exceptions for unimplemented attributes
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sat, 30 Jul 2022 15:31:03 +0000 (17:31 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 16 Aug 2022 10:21:45 +0000 (12:21 +0200)
tests/svgpp_context.cpp

index d7127cbed630e03b52b46a43ab67f0b4c9a4ee07..11f457e4f31525a9ba1fd30df46cef1499917e18 100644 (file)
@@ -152,9 +152,8 @@ void SvgppContext::transform_matrix(const boost::array<double, 6> &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) {