Skip to content

Commit d8ecd54

Browse files
committed
testmathlib.cpp: adjusted AppleClang preprocessor check in toDoubleNumber()
1 parent fc24bf5 commit d8ecd54

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
@@ -684,7 +684,8 @@ class TestMathLib : public TestFixture {
684684

685685
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: invalid");
686686

687-
#if defined(_LIBCPP_VERSION) && (defined(__APPLE__) && defined(__MACH__))
687+
// AppleClang before 18 reports a different error
688+
#if (defined(__APPLE__) && defined(__MACH__)) && (defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 180000))
688689
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1invalid");
689690
ASSERT_THROW_INTERNAL_EQUALS(MathLib::toDoubleNumber("1.1invalid"), INTERNAL, "Internal Error. MathLib::toDoubleNumber: conversion failed: 1.1invalid");
690691
#else

0 commit comments

Comments
 (0)