LCOV - code coverage report
Current view: top level - tests/ar - exceptions_tests.cpp (source / functions) Hit Total Coverage
Test: ar-cpp code coverage Lines: 6 6 100.0 %
Date: 2017-12-27 13:15:38 Functions: 8 9 88.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : ///
       2             : /// @file      ar/exceptions_tests.cpp
       3             : /// @copyright (c) 2015 by Petr Zemek (s3rvac@gmail.com) and contributors
       4             : /// @license   MIT, see the @c LICENSE file for more details
       5             : /// @brief     Tests for the @c exceptions module.
       6             : ///
       7             : 
       8             : #include <gtest/gtest.h>
       9             : 
      10             : #include "ar/exceptions.h"
      11             : 
      12             : using namespace std::literals::string_literals;
      13             : 
      14             : namespace ar {
      15             : namespace tests {
      16             : 
      17             : ///
      18             : /// Tests for Error.
      19             : ///
      20           2 : class ErrorTests: public testing::Test {};
      21             : 
      22           5 : TEST_F(ErrorTests,
      23             : WhatReturnsCorrectMessage) {
      24           2 :     const auto RefErrorMessage = "error message"s;
      25           2 :     Error ex{RefErrorMessage};
      26             : 
      27           1 :     ASSERT_EQ(RefErrorMessage, ex.what());
      28             : }
      29             : 
      30             : } // namespace tests
      31           3 : } // namespace ar

Generated by: LCOV version 1.13