LCOV - code coverage report
Current view: top level - test - exceptionsTests.cpp (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 5 5 100.0 %
Date: 2020-12-14 08:13:14 Functions: 2 2 100.0 %

          Line data    Source code
       1             : #include <gmock/gmock.h>
       2             : #include <gtest/gtest.h>
       3             : 
       4             : #include "exceptions.hpp"
       5             : 
       6             : using namespace testing;
       7             : 
       8           2 : TEST(TestExceptions, HandleWhatMethodOfBaseClassException)
       9             : {
      10             :   try
      11             :   {
      12           2 :     std::string message{"I am a message"};
      13           1 :     throw sayMessage(message);
      14             :   }
      15           2 :   catch (const sayMessage& e)
      16             :   {
      17           1 :     ASSERT_STREQ(e.what(), "I am a message");
      18             :   }
      19             : }

Generated by: LCOV version 1.14