Skip to content

Commit 8cf13a6

Browse files
committed
testmathlib.cpp: adjusted preprocessor check in toDoubleNumber() for AppleClang
1 parent 5f5c2bd commit 8cf13a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/testmathlib.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,8 @@ class TestMathLib : public TestFixture {
685685
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: invalid");
686686

687687
ASSERT_EQUALS(0, _LIBCPP_VERSION);
688-
#if defined(_LIBCPP_VERSION) && (defined(__APPLE__) && defined(__MACH__))
688+
// AppleClang before 17 reports a different error
689+
#if (defined(__APPLE__) && defined(__MACH__)) && (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 170000))
689690
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1invalid");
690691
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1.1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1.1invalid");
691692
#else

0 commit comments

Comments
 (0)