wpkg test coverage results

Coverage test results of the Windows Packager by Made to Order Software Corporation.

LCOV - code coverage report
Current view: top level - tests/unittests - unittest_uri_filename.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 7 7 100.0 %
Date: 2013-06-17 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*    unittest_uri_filename.h
       2             :  *    Copyright (C) 2013  Made to Order Software Corporation
       3             :  *
       4             :  *    This program is free software; you can redistribute it and/or modify
       5             :  *    it under the terms of the GNU General Public License as published by
       6             :  *    the Free Software Foundation; either version 2 of the License, or
       7             :  *    (at your option) any later version.
       8             :  *
       9             :  *    This program is distributed in the hope that it will be useful,
      10             :  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             :  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12             :  *    GNU General Public License for more details.
      13             :  *
      14             :  *    You should have received a copy of the GNU General Public License along
      15             :  *    with this program; if not, write to the Free Software Foundation, Inc.,
      16             :  *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
      17             :  *
      18             :  *    Authors
      19             :  *    Alexis Wilke   alexis@m2osw.com
      20             :  */
      21             : #ifndef UNIT_TEST_URI_FILENAME_H
      22             : #define UNIT_TEST_URI_FILENAME_H
      23             : 
      24             : #include <cppunit/extensions/HelperMacros.h>
      25             : 
      26             : namespace wpkg_filename
      27             : {
      28             : class uri_filename;
      29             : }
      30             : 
      31          12 : class URIFilenameUnitTests : public CPPUNIT_NS::TestFixture
      32             : {
      33           2 :     CPPUNIT_TEST_SUITE( URIFilenameUnitTests );
      34           1 :         CPPUNIT_TEST( path );
      35           1 :         CPPUNIT_TEST( invalid_ms_paths );
      36           1 :         CPPUNIT_TEST( invalid_uri );
      37           1 :         CPPUNIT_TEST( common_segments );
      38           2 :     CPPUNIT_TEST_SUITE_END();
      39             : 
      40             : public:
      41             :     struct expected_result
      42             :     {
      43             :         const char *    f_original_filename;
      44             :         const char *    f_fixed_original_filename;
      45             :         const char *    f_path_type;
      46             :         const char *    f_path_protocol;
      47             :         const char *    f_path_only;
      48             :         const char *    f_path_only_no_drive;
      49             :         const char *    f_full_path;
      50             :         const char *    f_segments[32];
      51             :         const char *    f_dirname;
      52             :         const char *    f_dirname_no_drive;
      53             :         const char *    f_basename;
      54             :         const char *    f_basename_last_only;
      55             :         const char *    f_extension;
      56             :         const char *    f_previous_extension;
      57             :         const char      f_msdos_drive;
      58             :         const char *    f_username;
      59             :         const char *    f_password;
      60             :         const char *    f_domain;
      61             :         const char *    f_port;
      62             :         const char *    f_share;
      63             :         bool            f_decode;
      64             :         const char *    f_anchor;
      65             :         const char *    f_query_variables[32];
      66             :         const char *    f_glob;
      67             : 
      68             :         bool            f_empty;
      69             :         bool            f_is_deb;
      70             :         bool            f_is_valid;
      71             :         bool            f_is_direct;
      72             :         bool            f_is_absolute;
      73             :     };
      74             : 
      75             :     void setUp();
      76             : 
      77             : protected:
      78             :     void check(const wpkg_filename::uri_filename& fn, const expected_result& er);
      79             : 
      80             :     void path();
      81             :     void invalid_ms_paths();
      82             :     void invalid_uri();
      83             :     void common_segments();
      84             : };
      85             : 
      86             : #endif
      87             : // vim: ts=4 sw=4 et

Generated by: LCOV version 1.9

The wpkg tool is an open source tool created by Made to Order Software Corporation.