Gromacs  2025-dev-20241003-bd59e46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Functions
testmatchers.cpp File Reference
#include "gmxpre.h"
#include "testutils/testmatchers.h"
#include <memory>
#include <ostream>
#include <string>
#include <tuple>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/real.h"
#include "testutils/testasserts.h"
+ Include dependency graph for testmatchers.cpp:

Description

Implements floating-point matchers from testmatchers.h for use with Google Mock.

Author
Mark Abraham mark..nosp@m.j.ab.nosp@m.raham.nosp@m.@gma.nosp@m.il.co.nosp@m.m

Classes

class  gmx::test::FloatTypeMatcher< FloatType >
 Implementation class for RealEq matcher. More...
 
class  gmx::test::RVecMatcher< FloatType >
 Implementation class for RvecEq matcher. More...
 

Functions

testing::Matcher< std::tuple
< float, float > > 
gmx::test::FloatEq (const FloatingPointTolerance &tolerance)
 Make matcher for floats for use with GoogleMock that compare equal when tolerance is satisifed. More...
 
testing::Matcher< std::tuple
< double, double > > 
gmx::test::DoubleEq (const FloatingPointTolerance &tolerance)
 Make matcher for doubles for use with GoogleMock that compare equal when tolerance is satisifed. More...
 
testing::Matcher< std::tuple
< real, real > > 
gmx::test::RealEq (const FloatingPointTolerance &tolerance)
 Make matcher for reals for use with GoogleMock that compare equal when tolerance is satisifed. More...
 
testing::Matcher< std::tuple
< BasicVector< real >
, BasicVector< real > > > 
gmx::test::RVecEq (const FloatingPointTolerance &tolerance)
 Make matcher for RVecs for use with GoogleMock that compare equal when tolerance is satisifed. More...