Add & fix SVG Graphics Context unit tests (PR #26504)

78 views
Skip to first unread message

Blake-Madden

unread,
May 23, 2026, 9:56:03 PMMay 23
to wx-...@googlegroups.com, Subscribed

Basically, a total overhaul of the wxSVGFileDC unit tests. I was getting failing tests with test_drawing and the image test case would only work on Windows. I did a rewrite from CppUnit to Catch2 and removed the external file dependencies. I also removed the "plugin" test interface in here. It seems to have never been used and is orphaned in numerous places. I removed it from here; let me know if you want me to remove the remaining traces of this.


You can view, comment on, or merge this pull request online at:

  https://github.com/wxWidgets/wxWidgets/pull/26504

Commit Summary

  • 9eff7ff Overhaul SVG unit tests
  • 14e502d Fix missing shape-rendering attribute in SVG graphics groups

File Changes

(5 files)

Patch Links:

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504@github.com>

Blake-Madden

unread,
May 24, 2026, 6:51:34 AMMay 24
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

—
View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/14e502dfb27cfd42cae7536416eafdc10e83faf1/after/a41df2c16a3dc6e8b8a41f5170bfcce8da95f813@github.com>

Blake-Madden

unread,
May 24, 2026, 7:02:03 AMMay 24
to wx-...@googlegroups.com, Subscribed

Closed #26504.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/issue_event/25897431213@github.com>

VZ

unread,
May 25, 2026, 8:27:27 AMMay 25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26504)

Just checking: was this closed intentionally?

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4534241779@github.com>

Blake-Madden

unread,
May 25, 2026, 8:31:41 AMMay 25
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#26504)

Yes, I was getting a bunch of warnings as errors from CppUnit in other files in some of the build configurations here. No idea why though, was coming from files I hadn't touched. Catch2'ifying the test_drawing target broke something somehow, so I'll either have to rethink this (or finish removing CppUnit from everyone else first).

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4534269175@github.com>

VZ

unread,
May 25, 2026, 8:38:28 AMMay 25
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26504)

Looking at the first failing build, the errors are due to wxBrush being incomplete, almost certainly due to the fact that wx/brush.h was indirectly included before but needs to be explicitly included now.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4534309758@github.com>

Blake-Madden

unread,
May 25, 2026, 9:15:33 AMMay 25
to wx-...@googlegroups.com, Subscribed

Reopened #26504.

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/issue_event/25927459072@github.com>

Blake-Madden

unread,
May 25, 2026, 9:20:22 AMMay 25
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 2 commits.

—
View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/a41df2c16a3dc6e8b8a41f5170bfcce8da95f813/after/b74750b33310a7e75d894a964d074ed1038c1590@github.com>

Blake-Madden

unread,
May 25, 2026, 9:56:26 AMMay 25
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • e5f5a40 Add another missing include

—
View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/b74750b33310a7e75d894a964d074ed1038c1590/after/e5f5a40986ec30a890cc2cc00f8a1ac183fc9608@github.com>

Blake-Madden

unread,
May 25, 2026, 10:04:54 AMMay 25
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • 45b5420 Delete orphaned plugin unit testing feature

—
View it on GitHub or unsubscribe.


Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/e5f5a40986ec30a890cc2cc00f8a1ac183fc9608/after/45b5420b521d4d18cef415b0f8956363a296ed2c@github.com>

VZ

unread,
May 26, 2026, 5:47:41 PMMay 26
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26504)

I'm not sure about the "plugin" tests but I'd definitely prefer to remove it one independent commit before making the SVG-related changes. Could you do it like this please?

—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4549252744@github.com>

Blake-Madden

unread,
Jun 7, 2026, 11:23:52 AMJun 7
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#26504)

I'm not sure about the "plugin" tests but I'd definitely prefer to remove it one independent commit before making the SVG-related changes. Could you do it like this please?

See #26568

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4643089363@github.com>

VZ

unread,
Jun 21, 2026, 10:44:34 AMJun 21
to wx-...@googlegroups.com, Subscribed
vadz left a comment (wxWidgets/wxWidgets#26504)

This has conflicts now, do you plan on resolving them or should I (try to) do it?

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4762321337@github.com>

Blake-Madden

unread,
Jun 21, 2026, 12:45:24 PMJun 21
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#26504)

I'll take a look at it tonight

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4762631751@github.com>

Blake-Madden

unread,
Jun 22, 2026, 6:32:30 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • d037a10 Merge branch 'master' into SVGTests

—
View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/45b5420b521d4d18cef415b0f8956363a296ed2c/after/d037a10dcf5b0d172768b289714bbed21133a1c3@github.com>

Blake-Madden

unread,
Jun 22, 2026, 6:54:47 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 2 commits.

  • f605d2b Remove all CppUnit code after rebase
  • 0e218b0 Remove reference imaged used in old comparisons

—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/d037a10dcf5b0d172768b289714bbed21133a1c3/after/0e218b0a09a0ea3e31146722ed3219457fc2dda1@github.com>

Blake-Madden

unread,
Jun 22, 2026, 6:58:40 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/0e218b0a09a0ea3e31146722ed3219457fc2dda1/after/a8d6ecdab9ac56ab4fcb7d5d5bdb2a7880d44e8e@github.com>

Blake-Madden

unread,
Jun 22, 2026, 7:04:14 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • cbc2740 Fix more missing includes

—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/a8d6ecdab9ac56ab4fcb7d5d5bdb2a7880d44e8e/after/cbc2740bd8d74ef721fc4890af78b41a379efb9c@github.com>

Blake-Madden

unread,
Jun 22, 2026, 7:18:21 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/cbc2740bd8d74ef721fc4890af78b41a379efb9c/after/82fe01d318453fa7c369e8b2f30b3222bc3514cc@github.com>

Blake-Madden

unread,
Jun 22, 2026, 7:45:49 AMJun 22
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#26504)

Removed all CppUnit and old image comparison content. Tests pass for me now, although it doesn't appear that our CI here is running test_drawing. Not sure if that is wanted or not, but probably just a matter of adding it to the matrix in ci.yml.

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4767900624@github.com>

VZ

unread,
Jun 22, 2026, 8:43:51 AMJun 22
to wx-...@googlegroups.com, Subscribed

@vadz commented on this pull request.

There are a lot of whitespace only and otherwise insignificant (e.g. additions of wxASCII_STR, removal of comments, ...) changes here so it's really difficult to see what has changed, i.e. what exactly has been fixed?

We do need to run these tests if we want to preserve/keep them going forward, so we should do it in at least some CI jobs, could you please add running them there?


In src/common/dcsvg.cpp:

> @@ -1525,11 +1526,12 @@ void wxSVGFileDCImpl::DoStartNewGraphics()
     if ( penStroke.empty() )
         penStroke = GetPenStroke(m_pen.GetColour(), m_pen.GetStyle());
 
-    s = wxString::Format(wxS("<g %s %s %s %s transform=\"translate(%d %d) scale(%s %s)\">\n"),
+    s = wxString::Format(wxS("<g %s %s %s %s %s transform=\"translate(%d %d) scale(%s %s)\">\n"),

I'm not sure how this works, but it looks like we might be outputting shape-rendering="auto" here unnecessarily, shouldn't we only add this if the rendering mode is different from default?

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/review/4544101662@github.com>

Blake-Madden

unread,
Jun 22, 2026, 9:04:31 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 2 commits.

  • cfdf1ab Add test_drawing to CI runs
  • 57a11ee Don't write unnecessary auto render value to SVG output

—
View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/82fe01d318453fa7c369e8b2f30b3222bc3514cc/after/57a11ee99938fe55e4fc33cf64f9a0d797d51745@github.com>

Blake-Madden

unread,
Jun 22, 2026, 9:05:49 AMJun 22
to wx-...@googlegroups.com, Subscribed

@Blake-Madden commented on this pull request.


In src/common/dcsvg.cpp:

> @@ -1525,11 +1526,12 @@ void wxSVGFileDCImpl::DoStartNewGraphics()
     if ( penStroke.empty() )
         penStroke = GetPenStroke(m_pen.GetColour(), m_pen.GetStyle());
 
-    s = wxString::Format(wxS("<g %s %s %s %s transform=\"translate(%d %d) scale(%s %s)\">\n"),
+    s = wxString::Format(wxS("<g %s %s %s %s %s transform=\"translate(%d %d) scale(%s %s)\">\n"),

fixed

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/review/4544299482@github.com>

Blake-Madden

unread,
Jun 22, 2026, 9:08:07 AMJun 22
to wx-...@googlegroups.com, Subscribed
Blake-Madden left a comment (wxWidgets/wxWidgets#26504)

I added test_drawing to the CI runs.

Sorry, what was more of a total rewrite than changing things. I don't think it can be meaningful compared to the old test harness, but rather reviewed as all new code.

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/c4768611955@github.com>

Blake-Madden

unread,
Jun 22, 2026, 9:22:32 AMJun 22
to wx-...@googlegroups.com, Push

@Blake-Madden pushed 1 commit.

  • 69ed7d8 test_drawing needs to be excluded from make CI

—
View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/before/57a11ee99938fe55e4fc33cf64f9a0d797d51745/after/69ed7d835d7e5c1891e03e2a81d21b893bce8273@github.com>

Blake-Madden

unread,
Sep 21, 2026, 6:37:35 AM (5 days ago) Sep 21
to wx-...@googlegroups.com, Subscribed

Closed #26504.

—
Reply to this email directly, view it on GitHub, or unsubscribe.

Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <wxWidgets/wxWidgets/pull/26504/issue_event/31521268113@github.com>

Reply all
Reply to author
Forward
0 new messages