Skip to content

A repository for G-Log CHECK and GTest ASSERT and EXPECT macros for Eigen types.

Notifications You must be signed in to change notification settings

miferco97/eigen_checks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eigen_checks

A repository for glog CHECK and gtest ASSERT and EXPECT macros for Eigen types.

GLOG

The Glog CHECK() macros are used to check errors and exit your program if they are found. These Eigen equivalents can be used to check conditions on matrices. See the glog documentation for a full description. The general form of use is:

CHECK_EIGEN_MATRIX_EQUAL(MatrixA, MatrixB) << "Informative error message!";

All tests happen component-wise. They fail if the matrices are different sizes. If the matrices are the same size, the test is applied to each corresponding pair of components.

To get these macros, use:

#include<eigen-checks/glog.h>

CHECK_EIGEN_MATRIX_EQUAL(MatrixA, MatrixB)

Checks if two matrices are binary equal.

CHECK_EIGEN_MATRIX_EQUAL_DOUBLE(MatrixA, MatrixB)

Checks if two matrices are equal to floating-point precision

CHECK_EIGEN_MATRIX_NEAR(MatrixA, MatrixB, Precision)

Checks if two matrices are equal to a user-specified precision.

GTEST

The gtest macros are built to facilitate unit testing with matrix types. This library provides two pieces of functionality: an macro that defines the main function, or entrypoint, for a guest invocation, and several macros for testing if matrices are similar.

Entrypoint

Macros

About

A repository for G-Log CHECK and GTest ASSERT and EXPECT macros for Eigen types.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.0%
  • CMake 6.0%