LCOV - code coverage report
Current view: top level - utilities/test - file_utility_test.cpp (source / functions) Hit Total Coverage
Test: mcrl2_coverage.info.cleaned Lines: 9 9 100.0 %
Date: 2024-03-08 02:52:28 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // Author(s): Wieger Wesselink
       2             : // Copyright: see the accompanying file COPYING or copy at
       3             : // https://github.com/mCRL2org/mCRL2/blob/master/COPYING
       4             : //
       5             : // Distributed under the Boost Software License, Version 1.0.
       6             : // (See accompanying file LICENSE_1_0.txt or copy at
       7             : // http://www.boost.org/LICENSE_1_0.txt)
       8             : //
       9             : 
      10             : #include "mcrl2/utilities/file_utility.h"
      11             : 
      12             : #define BOOST_AUTO_TEST_MAIN
      13             : #include <boost/test/included/unit_test.hpp>
      14             : 
      15             : using namespace mcrl2;
      16             : 
      17           2 : BOOST_AUTO_TEST_CASE(test_has_extension)
      18             : {
      19             :   using utilities::has_extension;
      20           1 :   BOOST_CHECK(has_extension("1.pbes", "pbes"));
      21           1 :   BOOST_CHECK(has_extension("1.pbes.bes", "bes"));
      22           1 :   BOOST_CHECK(!has_extension("1.pbes.bes", "pbes"));
      23           1 :   BOOST_CHECK(!has_extension("bes", "bes"));
      24           1 :   BOOST_CHECK(!has_extension("1.pbes", "bes"));
      25           1 :   BOOST_CHECK(!has_extension("a.pbes.bes","pbes"));  // Ticket #1374.
      26           1 :   BOOST_CHECK(!has_extension("a.besp","bes"));       // Mistake in previous code (until appr. revision 14827).
      27           1 : }

Generated by: LCOV version 1.14