From ebcc253aeb618f29d226ea01d02b9a2e0b28f574 Mon Sep 17 00:00:00 2001 From: maximusron Date: Tue, 27 Feb 2024 13:42:05 +0100 Subject: [PATCH] Add regex for osx --- test/NthDerivative/CustomDerivatives.C | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/NthDerivative/CustomDerivatives.C b/test/NthDerivative/CustomDerivatives.C index fb2ff5da7..12de29b8e 100644 --- a/test/NthDerivative/CustomDerivatives.C +++ b/test/NthDerivative/CustomDerivatives.C @@ -2,6 +2,7 @@ // RUN: ./CustomDerivative.out | FileCheck -check-prefix=CHECK-EXEC %s #include "clad/Differentiator/Differentiator.h" #include "clad/Differentiator/BuiltinDerivatives.h" +#include "../TestUtils.h" extern "C" int printf(const char* fmt, ...); @@ -124,8 +125,8 @@ float test_exp(float x) { // CHECK-NEXT:} // CHECK: clad::ValueAndPushforward, ValueAndPushforward > exp_pushforward_pushforward(float x, float d_x, float _d_x, float _d_d_x) { -// CHECK-NEXT: ValueAndPushforward _t0 = clad::custom_derivatives::std::exp_pushforward(x, _d_x); -// CHECK-NEXT: ValueAndPushforward _t1 = clad::custom_derivatives::std::exp_pushforward(x, _d_x); +// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward _t0 = clad::custom_derivatives{{(::std)?}}::exp_pushforward(x, _d_x); +// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward _t1 = clad::custom_derivatives{{(::std)?}}::exp_pushforward(x, _d_x); // CHECK-NEXT: float &_t2 = _t1.value; // CHECK-NEXT: return {{[{][{]}}_t0.value, _t2 * d_x}, {_t0.pushforward, _t1.pushforward * d_x + _t2 * _d_d_x{{[}][}]}}; // CHECK-NEXT:} @@ -135,8 +136,8 @@ float test_exp(float x) { // CHECK-NEXT: float _d__d_x = 0; // CHECK-NEXT: float _d_x0 = 1; // CHECK-NEXT: clad::ValueAndPushforward, ValueAndPushforward > _t0 = exp_pushforward_pushforward(x * x, _d_x0 * x + x * _d_x0, _d_x * x + x * _d_x, _d__d_x * x + _d_x0 * _d_x + _d_x * _d_x0 + x * _d__d_x); -// CHECK-NEXT: ValueAndPushforward _d__t0 = _t0.pushforward; -// CHECK-NEXT: ValueAndPushforward _t00 = _t0.value; +// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward _d__t0 = _t0.pushforward; +// CHECK-NEXT: {{(clad::)?}}ValueAndPushforward _t00 = _t0.value; // CHECK-NEXT: return _d__t0.pushforward; // CHECK-NEXT:} @@ -163,7 +164,4 @@ int main() { clad::differentiate<2>(test_exp); printf("Result is = %f\n", test_exp_d2arg0(2)); // CHECK-EXEC: Result is = 982.766663 -} - - - +} \ No newline at end of file