You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling with clang+libc++, and an exception was thrown before (even in a different test-case), Catch will sometime execute a test case where all child sections are skipped. The CHECK in the example below should succeed in all cases, yet it fails with clang and libc++ (with expansion 0 > 0). Compiling with clang and gcc's libstdc++, with gcc, or with clang-cl it works fine, so either libc++ implements something differently and catch doesn't like it, or it's simply buggy (previously I've found a bug in libcxxrt's exception handling code while debugging a luajit related issue, so it's possible...).
Steps to reproduce
Here's a minimal example that triggers the problem.
#defineCATCH_CONFIG_MAIN
#include<catch.hpp>TEST_CASE("a")
{
CHECK_THROWS(throw3);
}
TEST_CASE("b")
{
int i = 0;
SECTION("a") { i = 1; }
SECTION("b") { i = 2; }
CHECK(i > 0);
}
Compile it with clang++ -stdlib=libc++. Optimization levels or -std=c++11, -std=c++14 don't matter. If I only run test case b, it works correctly.
Extra information
Catch version: v1.7.0
Operating System: Gentoo
Compiler+version: clang 3.9.1, libcxxrt from git master
The text was updated successfully, but these errors were encountered:
Okay, I'm pretty sure libcxxrt is at fault here: https://github.com/pathscale/libcxxrt/issues/45
Basically std::uncaught_exception() returns true after a rethrow, even when there's no active exceptions.
Closing the issue here.
Description
When compiling with clang+libc++, and an exception was thrown before (even in a different test-case), Catch will sometime execute a test case where all child sections are skipped. The
CHECK
in the example below should succeed in all cases, yet it fails with clang and libc++ (with expansion0 > 0
). Compiling with clang and gcc's libstdc++, with gcc, or with clang-cl it works fine, so either libc++ implements something differently and catch doesn't like it, or it's simply buggy (previously I've found a bug in libcxxrt's exception handling code while debugging a luajit related issue, so it's possible...).Steps to reproduce
Here's a minimal example that triggers the problem.
Compile it with
clang++ -stdlib=libc++
. Optimization levels or-std=c++11
,-std=c++14
don't matter. If I only run test caseb
, it works correctly.Extra information
The text was updated successfully, but these errors were encountered: