From 57848b1d2d61406fb63326448b7723b811a210f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Tue, 8 Oct 2024 18:06:11 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-testing:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BB=D0=BE=D0=B3=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D1=8F=20=D0=A1++=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=B2=20`ex?= =?UTF-8?q?tra/dupfix=5Fmultiple`.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/dupfix_multiple.c++ | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/test/extra/dupfix_multiple.c++ b/test/extra/dupfix_multiple.c++ index 3e1d323e..1b0ffc45 100644 --- a/test/extra/dupfix_multiple.c++ +++ b/test/extra/dupfix_multiple.c++ @@ -5,10 +5,7 @@ #include #include -int main(int argc, const char *argv[]) { - (void)argc; - (void)argv; - +int doit() { mdbx::path db_filename = "test-dupfix-multiple"; mdbx::env_managed::remove(db_filename); mdbx::env_managed env(db_filename, mdbx::env_managed::create_parameters(), @@ -285,3 +282,15 @@ int main(int argc, const char *argv[]) { std::cout << "OK\n"; return EXIT_SUCCESS; } + +int main(int argc, const char *argv[]) { + (void)argc; + (void)argv; + + try { + return doit(); + } catch (const std::exception &ex) { + std::cerr << "Exception: " << ex.what() << "\n"; + return EXIT_FAILURE; + } +}