Metis 2.0.0
High-performance C++20 dual-mode numerical framework
Loading...
Searching...
No Matches
GTestDiffTest.hpp File Reference

GoogleTest wrappers for the differentiability test harness. More...

#include <gtest/gtest.h>
#include <metis/utils/DiffTestHarness.hpp>
Include dependency graph for GTestDiffTest.hpp:

Go to the source code of this file.

Namespaces

namespace  metis
namespace  metis::diff_test

Functions

template<typename Func>
void metis::diff_test::expect_dual_mode (Func &&f, const std::vector< std::vector< double > > &test_points, const DiffTestOptions &opts={})
 Assert that a dual-mode function compiles symbolically and that symbolic output matches numeric output at all test points.
template<typename Func>
void metis::diff_test::expect_differentiable (Func &&f, const std::vector< std::vector< double > > &test_points, const DiffTestOptions &opts={})
 Assert that a dual-mode function is differentiable: symbolic compilation + value match + AD Jacobian matches FD Jacobian.

Detailed Description

GoogleTest wrappers for the differentiability test harness.

Thin layer on top of DiffTestHarness.hpp that translates results into GTest assertions with informative failure messages.

See also
DiffTestHarness.hpp