From a3331c87d00eb4bd8b7432cd7a908f5a95da1f3b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Oct 2022 19:26:02 +0200 Subject: [PATCH] Stop using Catch::toString() This function doesn't exist in Catch2 any longer, so prepare for the upgrade by stopping to use it and converting things to string more explicitly. No real changes yet. --- tests/controls/gridtest.cpp | 8 ++++---- tests/image/image.cpp | 2 +- tests/testimage.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/controls/gridtest.cpp b/tests/controls/gridtest.cpp index 50e7f2f730..74a980d28b 100644 --- a/tests/controls/gridtest.cpp +++ b/tests/controls/gridtest.cpp @@ -1841,7 +1841,7 @@ TEST_CASE_METHOD(GridTestCase, // repeat the same tests for both rows and columns as the code for // updating them works symmetrically. - GIVEN(Catch::toString(multi)) + GIVEN(multi.ToString()) { FitGridToMulticell(m_grid, multi); m_grid->SetMulticell(multi); @@ -1876,7 +1876,7 @@ TEST_CASE_METHOD(GridTestCase, wxSwap(multi.rows, multi.cols); - GIVEN(Catch::toString(multi)) + GIVEN(multi.ToString()) { FitGridToMulticell(m_grid, multi); m_grid->SetMulticell(multi); @@ -1958,7 +1958,7 @@ TEST_CASE_METHOD(GridTestCase, Multicell multi(1, 1, 5, 3); - GIVEN(Catch::toString(multi)) + GIVEN(multi.ToString()) { FitGridToMulticell(m_grid, multi); m_grid->SetMulticell(multi); @@ -1993,7 +1993,7 @@ TEST_CASE_METHOD(GridTestCase, wxSwap(multi.rows, multi.cols); - GIVEN(Catch::toString(multi)) + GIVEN(multi.ToString()) { FitGridToMulticell(m_grid, multi); m_grid->SetMulticell(multi); diff --git a/tests/image/image.cpp b/tests/image/image.cpp index 77ee78d0ee..70894ea7bd 100644 --- a/tests/image/image.cpp +++ b/tests/image/image.cpp @@ -1400,7 +1400,7 @@ FindMaxChannelDiff(const wxImage& i1, const wxImage& i2) const wxImage imageFromFile(file); \ if ( imageFromFile.IsOk() ) \ { \ - INFO("Wrong scaled \"" << file << "\" " << Catch::toString(image)); \ + INFO("Wrong scaled \"" << file << "\" " << Catch::StringMaker::convert(image)); \ CHECK(FindMaxChannelDiff(imageFromFile, image) <= 1); \ } \ else \ diff --git a/tests/testimage.h b/tests/testimage.h index d5d90b5c5e..557d9a945f 100644 --- a/tests/testimage.h +++ b/tests/testimage.h @@ -145,7 +145,7 @@ public: std::string describe() const override { std::string desc = "doesn't have the same RGB data as " + - Catch::toString(m_image); + Catch::StringMaker::convert(m_image); if ( !m_diffDesc.empty() ) desc += + ": " + m_diffDesc.ToStdString(wxConvUTF8);