nixpkgs/pkgs/development/libraries/argagg/0001-catch.diff
AndersonTorres 4cd90c2e2b argagg: init at 0.4.6
Caveat: it is not running on ARM-Darwin.
2022-04-17 16:23:11 -03:00

21 lines
1.5 KiB
Diff

--- old/test/doctest.h 2019-03-05 18:04:06.143740733 +0300
+++ new/test/doctest.h 2019-03-05 18:04:43.577284916 +0300
@@ -1307,7 +1307,7 @@
__FILE__, __LINE__, #expr, #as); \
try { \
expr; \
- } catch(as) { \
+ } catch(as e) { \
_DOCTEST_RB.m_threw = true; \
_DOCTEST_RB.m_threw_as = true; \
} catch(...) { _DOCTEST_RB.m_threw = true; } \
@@ -1332,7 +1332,7 @@
#define DOCTEST_REQUIRE_THROWS(expr) DOCTEST_ASSERT_THROWS(expr, DT_REQUIRE_THROWS)
#define DOCTEST_WARN_THROWS_AS(expr, ex) DOCTEST_ASSERT_THROWS_AS(expr, ex, DT_WARN_THROWS_AS)
-#define DOCTEST_CHECK_THROWS_AS(expr, ex) DOCTEST_ASSERT_THROWS_AS(expr, ex, DT_CHECK_THROWS_AS)
+#define DOCTEST_CHECK_THROWS_AS(expr, ex) DOCTEST_ASSERT_THROWS_AS(expr, const ex &, DT_CHECK_THROWS_AS)
#define DOCTEST_REQUIRE_THROWS_AS(expr, ex) DOCTEST_ASSERT_THROWS_AS(expr, ex, DT_REQUIRE_THROWS_AS)
#define DOCTEST_WARN_NOTHROW(expr) DOCTEST_ASSERT_NOTHROW(expr, DT_WARN_NOTHROW)