depot/third_party/nixpkgs/pkgs/development/libraries/argagg/0001-catch.diff
Default email 22017988c6 Project import generated by Copybara.
GitOrigin-RevId: c777cdf5c564015d5f63b09cc93bef4178b19b01
2022-04-27 11:35:20 +02:00

20 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)