LCOV - code coverage report
Current view: top level - tests - version.cpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 7 100.0 %
Date: 2019-08-24 13:53:02 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2006-2019  Made to Order Software Corp.  All Rights Reserved
       3             :  *
       4             :  * https://snapwebsites.org/project/snaplogger
       5             :  * contact@m2osw.com
       6             :  *
       7             :  * This program is free software; you can redistribute it and/or modify
       8             :  * it under the terms of the GNU General Public License as published by
       9             :  * the Free Software Foundation; either version 2 of the License, or
      10             :  * (at your option) any later version.
      11             :  *
      12             :  * This program is distributed in the hope that it will be useful,
      13             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15             :  * GNU General Public License for more details.
      16             :  *
      17             :  * You should have received a copy of the GNU General Public License along
      18             :  * with this program; if not, write to the Free Software Foundation, Inc.,
      19             :  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      20             :  */
      21             : 
      22             : // self
      23             : //
      24             : #include    "main.h"
      25             : 
      26             : // snaplogger lib
      27             : //
      28             : #include    <snaplogger/version.h>
      29             : 
      30             : 
      31             : 
      32             : 
      33           3 : CATCH_TEST_CASE("Version", "[version]")
      34             : {
      35           2 :     CATCH_START_SECTION("verify runtime vs compile time version numbers")
      36             :     {
      37           1 :         CATCH_REQUIRE(snaplogger::get_major_version()   == SNAPLOGGER_VERSION_MAJOR);
      38           1 :         CATCH_REQUIRE(snaplogger::get_release_version() == SNAPLOGGER_VERSION_MINOR);
      39           1 :         CATCH_REQUIRE(snaplogger::get_patch_version()   == SNAPLOGGER_VERSION_PATCH);
      40           1 :         CATCH_REQUIRE(strcmp(snaplogger::get_version_string(), SNAPLOGGER_VERSION_STRING) == 0);
      41             :     }
      42             :     CATCH_END_SECTION()
      43           7 : }
      44             : 
      45             : 
      46             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.12