diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-14 14:17:27 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-06-14 14:26:11 +0300 |
commit | f10d4febf70e309efff2d836c3256e36573d6585 (patch) | |
tree | facf07a8319c7c84dfc96c89bde3a89bd1403f78 | |
parent | d7ac45da332a6606af36793f494bce8ef19f3f01 (diff) | |
download | qtlocation-mapboxgl-upstream/tmpsantos-test_run.tar.gz |
[tests] Added a test to verify an exception catching quirkupstream/tmpsantos-test_run
-rw-r--r-- | test/test-files.json | 1 | ||||
-rw-r--r-- | test/util/compiler.test.cpp | 14 |
2 files changed, 15 insertions, 0 deletions
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 <mbgl/test/util.hpp> + +#include <stdexcept> + +TEST(Compiler, ExceptionQuirk) { + try { + throw std::invalid_argument("foo"); + } catch (const std::exception&) { + SUCCEED(); + return; + } + + FAIL() << "Should never be called"; +} |