Quinoa all test code coverage report
Current view: top level - UnitTest - TUTTest.hpp (source / functions) Hit Total Coverage
Commit: -128-NOTFOUND Lines: 5 5 100.0 %
Date: 2024-11-08 10:37:44 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 8 16 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                 :       2160 :     explicit TUTTest( Proxy&& proxy, const std::string& groupname, int t ) {
      36                 :       2160 :       tut::test_result tr;
      37         [ +  - ]:       2160 :       g_runner.get().run_test( groupname, t, tr );
      38 [ +  - ][ +  - ]:      15120 :       proxy.evaluate( { tr.group, tr.name, std::to_string(tr.result),
         [ +  - ][ +  + ]
         [ +  + ][ -  - ]
                 [ -  - ]
      39                 :            :                         tr.message, tr.exception_typeid } );
      40                 :       2160 :     }
      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