Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
testmatchers.h File Reference
#include <memory>
#include <gmock/gmock.h>
#include "gromacs/math/vectypes.h"
#include "gromacs/utility/real.h"
#include "testutils/testasserts.h"
+ Include dependency graph for testmatchers.h:

Description

Extra GoogleMock matchers for unit tests.

This file provides the usual kind of GoogleMock matchers that extend the usefulness of GoogleMock EXPECT_THAT constructs to the kinds of containers of reals commonly used. This means that test code can write one-liners rather than loops over whole containers.

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

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
< RVec, RVec > > 
gmx::test::RVecEq (const FloatingPointTolerance &tolerance)
 Make matcher for RVecs for use with GoogleMock that compare equal when tolerance is satisifed. More...