LCOV - code coverage report
Current view: top level - test_routines/PrettyPrint - Stl.h (source / functions) Hit Total Coverage
Test: test_coverage.info.cleaned Lines: 0 4 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 <optional>
       4             : #include <vector>
       5             : #include "spdlog/fmt/fmt.h"
       6             : #include "spdlog/fmt/bundled/ranges.h"
       7             : 
       8             : namespace doctest
       9             : {
      10             :     template <typename T>
      11             :     struct StringMaker<std::optional<T>> {
      12           0 :         static String convert(std::optional<T> opt)
      13             :         {
      14           0 :             if (opt) {
      15           0 :                 return fmt::format("{{ {} }}", *opt).c_str();
      16             :             } else {
      17           0 :                 return "{ empty }";
      18             :             }
      19             :         }
      20             :     };
      21             : 
      22             :     template <typename T>
      23             :     struct StringMaker<std::vector<T>> {
      24             :         static String convert(const std::vector<T>& value)
      25             :         {
      26             :             return fmt::format("{}", value).c_str();
      27             :         }
      28             :     };
      29             : } // namespace doctest

Generated by: LCOV version 1.14