LCOV - code coverage report
Current view: top level - test_routines/PrettyPrint - Eigen.h (source / functions) Hit Total Coverage
Test: test_coverage.info.cleaned Lines: 0 6 0.0 %
Date: 2022-08-04 03:43:28 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #include "doctest/doctest.h"
       2             : 
       3             : #include <Eigen/Core>
       4             : #include <sstream>
       5             : 
       6             : namespace doctest
       7             : {
       8             :     template <typename T, int Rows, int Cols>
       9             :     struct StringMaker<Eigen::Matrix<T, Rows, Cols>> {
      10           0 :         static String convert(const Eigen::Matrix<T, Rows, Cols>& mat)
      11             :         {
      12           0 :             std::ostringstream oss;
      13           0 :             Eigen::IOFormat fmt(4, 0, ", ", "\n", "[", "]");
      14           0 :             oss << "\n" << mat.format(fmt);
      15           0 :             return oss.str().c_str();
      16           0 :         }
      17             :     };
      18             : 
      19             :     template <typename T, int Rows>
      20             :     struct StringMaker<Eigen::Matrix<T, Rows, 1>> {
      21             :         static String convert(const Eigen::Matrix<T, Rows, 1>& vec)
      22             :         {
      23             :             std::ostringstream oss;
      24             :             Eigen::IOFormat fmt(10, 0, ", ", ", ", "", "", "[", "]");
      25             :             oss << "\n" << vec.format(fmt);
      26             :             return oss.str().c_str();
      27             :         }
      28             :     };
      29             : 
      30             : } // namespace doctest

Generated by: LCOV version 1.14