Only use death tests if available

This commit is contained in:
vitaut
2015-06-22 08:17:23 -07:00
parent 8450f5e1d3
commit 8ab665afbc
8 changed files with 98 additions and 8 deletions

View File

@@ -25,6 +25,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "test-assert.h"
#include <cfloat>
#include <climits>
#include <cstring>
@@ -680,7 +682,7 @@ TEST(ArgVisitorTest, VisitUnhandledArg) {
TEST(ArgVisitorTest, VisitInvalidArg) {
Arg arg = Arg();
arg.type = static_cast<Arg::Type>(Arg::CUSTOM + 1);
EXPECT_DEBUG_DEATH(TestVisitor().visit(arg), "Assertion");
EXPECT_ASSERT(TestVisitor().visit(arg), "invalid argument type");
}
// Tests fmt::internal::count_digits for integer type Int.