From f10d4febf70e309efff2d836c3256e36573d6585 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 14 Jun 2019 14:17:27 +0300 Subject: [tests] Added a test to verify an exception catching quirk --- test/test-files.json | 1 + test/util/compiler.test.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 test/util/compiler.test.cpp diff --git a/test/test-files.json b/test/test-files.json index e46f833269..9e486e2c5e 100644 --- a/test/test-files.json +++ b/test/test-files.json @@ -82,6 +82,7 @@ "test/tile/tile_id.test.cpp", "test/tile/vector_tile.test.cpp", "test/util/async_task.test.cpp", + "test/util/compiler.test.cpp", "test/util/dtoa.test.cpp", "test/util/geo.test.cpp", "test/util/grid_index.test.cpp", diff --git a/test/util/compiler.test.cpp b/test/util/compiler.test.cpp new file mode 100644 index 0000000000..44409a92ca --- /dev/null +++ b/test/util/compiler.test.cpp @@ -0,0 +1,14 @@ +#include + +#include + +TEST(Compiler, ExceptionQuirk) { + try { + throw std::invalid_argument("foo"); + } catch (const std::exception&) { + SUCCEED(); + return; + } + + FAIL() << "Should never be called"; +} -- cgit v1.2.1