From edbd1a2e198ff7a7576464c8531a8cee705a7c40 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@cnes.fr> Date: Mon, 19 Nov 2018 14:57:51 +0100 Subject: [PATCH] TEST: Test support of built-in math functions --- Modules/Core/Functor/test/otbFunctorImageFilter.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/Core/Functor/test/otbFunctorImageFilter.cxx b/Modules/Core/Functor/test/otbFunctorImageFilter.cxx index a8323f2fd2..19fd675af1 100644 --- a/Modules/Core/Functor/test/otbFunctorImageFilter.cxx +++ b/Modules/Core/Functor/test/otbFunctorImageFilter.cxx @@ -29,6 +29,7 @@ #include <numeric> #include <complex> +#include <math.h> // static tests @@ -345,6 +346,12 @@ int otbFunctorImageFilter(int itkNotUsed(argc), char * itkNotUsed(argv) []) filter->SetVariadicInputs(vimage,image); std::cout<<filter->GetVariadicInput<0>()<< filter->GetVariadicInput<1>()<<std::endl; + // Test FunctorImageFilter with a built-in math function + using CosType = double(double); + auto filterCos = NewFunctorFilter(static_cast<CosType *>(std::cos)); + filterCos->SetVariadicInputs(image); + filterCos->Update(); + // test FunctorImageFilter with a lambda double scale = 10.; -- GitLab