From 4d8ff19a1a7e0e76913a7a24c0ae6327b053fec6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 17 May 2014 12:29:08 +0000 Subject: [PATCH] Include renderer version into the platform tag in graphics context tests. This allows to distinguish the results of the same renderer (e.g. GDI+-based one) on the different OS versions (because GDI+ produces different results under XP and Windows 8). Closes #16260. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- tests/drawing/drawing.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/drawing/drawing.cpp b/tests/drawing/drawing.cpp index 89dc4762cb..96ce601c08 100644 --- a/tests/drawing/drawing.cpp +++ b/tests/drawing/drawing.cpp @@ -198,7 +198,17 @@ wxString GraphicsContextDrawingTestCase::GetTestsReferenceDirectory() const wxString GraphicsContextDrawingTestCase::GetPlatformTag() const { - return wxPlatformInfo::Get().GetOperatingSystemFamilyName().Lower(); + // We consider that the platform tag is the kind of default renderer plus + // its major/minor versions. + // The reason why including major/minor version is important, is that the + // rendering engine typically evolves somewhat between two version + // (i.e. font rendering is not the same in Windows XP and Windows 8) + int major, minor; + const wxGraphicsRenderer *defaultRenderer = wxGraphicsRenderer::GetDefaultRenderer(); + wxString rendererName = defaultRenderer->GetName(); + defaultRenderer->GetVersion (&major, &minor); + + return wxString::Format("%s-%d.%d", rendererName, major, minor); } ///////////////////////////////////////////////////////////////////////////////