Walker test code coverage report
Current view: top level - UnitTest - TUTTest.hpp (source / functions) Hit Total Coverage
Commit: test_coverage.info Lines: 5 5 100.0 %
Date: 2022-09-21 18:57:21 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 10 20 50.0 %

           Branch data     Line data    Source code
       1                 :            : // *****************************************************************************
       2                 :            : /*!
       3                 :            :   \file      src/UnitTest/TUTTest.hpp
       4                 :            :   \copyright 2012-2015 J. Bakosi,
       5                 :            :              2016-2018 Los Alamos National Security, LLC.,
       6                 :            :              2019-2021 Triad National Security, LLC.
       7                 :            :              All rights reserved. See the LICENSE file for details.
       8                 :            :   \brief     Template Unit Test unit test class declaration
       9                 :            :   \details   Template Unit Test unit test class declaration.
      10                 :            : */
      11                 :            : // *****************************************************************************
      12                 :            : #ifndef TUTTest_h
      13                 :            : #define TUTTest_h
      14                 :            : 
      15                 :            : #include <string>
      16                 :            : #include <iosfwd>
      17                 :            : 
      18                 :            : #include "NoWarning/tut.hpp"
      19                 :            : #include "NoWarning/tuttest.decl.h"
      20                 :            : 
      21                 :            : namespace unittest {
      22                 :            : 
      23                 :            : extern tut::test_runner_singleton g_runner;
      24                 :            : 
      25                 :            : //! \brief Generic Charm++ chare class for unit tests utilizing the Template
      26                 :            : //!    Unit Test library
      27                 :            : template< class Proxy >
      28                 :            : class TUTTest : public CBase_TUTTest< Proxy > {
      29                 :            : 
      30                 :            :   public:
      31                 :            :     //! Constructor: run test then call back to host proxy to evaluate it
      32                 :            :     //! \param[in] proxy Host proxy to call back to after test has been run
      33                 :            :     //! \param[in] groupname Name of the group the test belongs to
      34                 :            :     //! \param[in] t Test number in test group
      35                 :       2400 :     explicit TUTTest( Proxy&& proxy, const std::string& groupname, int t ) {
      36                 :       2400 :       tut::test_result tr;
      37         [ +  - ]:       2400 :       g_runner.get().run_test( groupname, t, tr );
      38 [ +  - ][ +  - ]:      14400 :       proxy.evaluate( { tr.group, tr.name, std::to_string(tr.result),
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  + ]
                 [ -  - ]
      39                 :            :                         tr.message, tr.exception_typeid } );
      40                 :       2400 :     }
      41                 :            : };
      42                 :            : 
      43                 :            : } // unittest::
      44                 :            : 
      45                 :            : #define CK_TEMPLATES_ONLY
      46                 :            : #include "NoWarning/tuttest.def.h"
      47                 :            : #undef CK_TEMPLATES_ONLY
      48                 :            : 
      49                 :            : #endif // TUTTest_h

Generated by: LCOV version 1.14