[gnome-commander] Fixes broken 'make distcheck'



commit 80159a255fd1e78f49666dbef389ebd05a8c3b60
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Dec 6 16:22:33 2015 +0100

    Fixes broken 'make distcheck'
    
    - Removes header files for unit tests
    - Adds additional paths to AM_CPPFLAGS in Makefile.am
      (maybe to many of them, will check later)

 tests/Makefile.am              |   15 ++++++---
 tests/iv_bm_search_test.cc     |   40 ++++++++++++++++++++++++--
 tests/iv_bm_search_test.h      |   61 ----------------------------------------
 tests/iv_datapresentation.cc   |    2 +-
 tests/iv_fileops_test.cc       |   10 ++++--
 tests/iv_fileops_test.h        |   38 -------------------------
 tests/iv_imagerenderer_test.cc |    3 +-
 tests/iv_inputmodes_test.cc    |    2 +-
 tests/iv_textrenderer_test.cc  |    2 +-
 tests/iv_viewerwidget_test.cc  |    4 +-
 10 files changed, 60 insertions(+), 117 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6bf2e36..e165dcf 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS =
+## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = \
        $(CC_WARNINGS) \
@@ -7,7 +7,12 @@ AM_CPPFLAGS = \
        $(GTK_CFLAGS) \
        $(GNOMEUI_CFLAGS) \
        $(GTEST_CPPFLAGS) \
-       -I$(top_builddir)/src
+       -I$(top_builddir)/src \
+       -I$(top_srcdir)/src \
+       -I$(top_srcdir)/src/intviewer \
+       -I$(top_srcdir)/tests \
+       -I$(srcdir)/ \
+       -I$(srcdir)/..
 
 INTVLIBS = \
        $(GLIB_LIBS) \
@@ -18,9 +23,9 @@ INTVLIBS = \
 
 ADDITIONAL_LDADD = \
        $(top_builddir)/src/intviewer/libgviewer.a \
-    $(GOBJECT_LIBS) \
-    $(GTK_LIBS) \
-    $(GNOMEUI_LIBS)
+       $(GOBJECT_LIBS) \
+       $(GTK_LIBS) \
+       $(GNOMEUI_LIBS)
 
 TESTS = \
        iv_viewerwidget \
diff --git a/tests/iv_bm_search_test.cc b/tests/iv_bm_search_test.cc
index 96c3bd1..0c63aa4 100644
--- a/tests/iv_bm_search_test.cc
+++ b/tests/iv_bm_search_test.cc
@@ -5,8 +5,7 @@
  * @details In this file all tests are placed which belong to the
  * Boyer–Moore string search algorithm, used in the internal viewer of
  * GCMD. Currently, only a single test is implemented in which a short
- * pattern of integers is searched inside a bigger array of integers
- * (see definitions in @link BmByteTest @endlink).
+ * pattern of integers is searched inside a bigger array of integers.
  *
  * @copyright (C) 2006 Assaf Gordon\n
  * @copyright (C) 2007-2012 Piotr Eljasiak\n
@@ -28,7 +27,41 @@
  */
 
 #include "gtest/gtest.h"
-#include <iv_bm_search_test.h>
+#include <bm_byte.h>
+#include <gvtypes.h>
+#include <viewer-utils.h>
+#include <bm_chartype.h>
+
+/**
+ *  The fixture for testing class BmByteTest.
+ */
+class BmByteTest : public ::testing::Test {
+  public:
+    BmByteTest() : pattern{0x01, 0x04, 0xB4, 0xFE, 0x01, 0x01, 0x04},
+                   text{
+0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,
+0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,
+0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,
+0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,
+0x3d,0x3e,0x3f,0x40,0x41,0x42,0x43,0x44,0x45,0x46,0x47,0x48,0x49,0x4a,0x4b,
+0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x01,0x04,0x59,0x5a,
+0x5b,0x5c,0x5d,0x5e,0x5f,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,
+0x6a,0x6b,0x6c,0x6d,0x01,0x01,0x04,0x71,0x72,0x73,0x74,0x75,0x76,0x77,0x78,
+0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,
+0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x01,0x04,0xB4,0xFE,0x01,0x01,0x04,0x96, //match on this line
+0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x9e,0x9f,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,
+0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
+0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,0xbd,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,
+0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0x05,0x04,
+0xB4,0xFe,0x01,0x01,0x04,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,0xde,0xdf,0xe0,0xe1,
+0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf0,
+0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,0x01,0x04,0xb4,0xfe,0x01,0x01,0x04,0x00} {}; // match on this line, 
too
+  protected:
+    const guint8 pattern[7];
+    const guint8 text[256];
+};
+
+////////////////////////////////////////////////////////////////////////
 
 /**
  * In this test a short pattern of integers is searched inside a 
@@ -84,6 +117,7 @@ TEST_F(BmByteTest, match_test) {
     free_bm_byte_data(data);
 }
 
+////////////////////////////////////////////////////////////////////////
 
 /**
  * In this test a pattern of UTF-8 encoded letters is searched in a text
diff --git a/tests/iv_datapresentation.cc b/tests/iv_datapresentation.cc
index b7c442a..e29b373 100644
--- a/tests/iv_datapresentation.cc
+++ b/tests/iv_datapresentation.cc
@@ -21,7 +21,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <intviewer/libgviewer.h>
+#include <libgviewer.h>
 #include "gtest/gtest.h"
 
 const gchar *filename = "../INSTALL";
diff --git a/tests/iv_fileops_test.cc b/tests/iv_fileops_test.cc
index dbc7b7e..7ee1f62 100644
--- a/tests/iv_fileops_test.cc
+++ b/tests/iv_fileops_test.cc
@@ -22,13 +22,15 @@
  */
 
 #include "gtest/gtest.h"
-#include <iv_fileops_test.h>
+#include <libgviewer.h>
+#include <gvtypes.h>
+#include <fileops.h>
 
-FileOpsTest::FileOpsTest() {}
-FileOpsTest::~FileOpsTest() {}
+// The fixture for testing class FileOpsTest.
+class FileOpsTest : public ::testing::Test {};
 
 TEST_F(FileOpsTest, gv_file_get_byte_does_read) {
-    const char *file_path = "../INSTALL";
+    const char *file_path = "../README";
     ViewerFileOps *fops;
     offset_type end;
     offset_type current;
diff --git a/tests/iv_imagerenderer_test.cc b/tests/iv_imagerenderer_test.cc
index e727a4f..9e6a7f7 100644
--- a/tests/iv_imagerenderer_test.cc
+++ b/tests/iv_imagerenderer_test.cc
@@ -25,7 +25,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
-#include <intviewer/libgviewer.h>
+#include <libgviewer.h>
 #include "gtest/gtest.h"
 
 class ImageRendererBestFitTest : public ::testing::TestWithParam<bool> {};
@@ -41,6 +41,7 @@ TEST_P(ImageRendererBestFitTest, image_renderer_set_best_fit_test) {
     ASSERT_EQ(GetParam(), image_render_get_best_fit(IMAGE_RENDER(imgr)));
 }
 
+////////////////////////////////////////////////////////////////////////
 
 class ImageRendererScaleFactorTest : public ::testing::Test {};
 
diff --git a/tests/iv_inputmodes_test.cc b/tests/iv_inputmodes_test.cc
index 8511b5b..ce93958 100644
--- a/tests/iv_inputmodes_test.cc
+++ b/tests/iv_inputmodes_test.cc
@@ -27,7 +27,7 @@
  */
 
 #include "gtest/gtest.h"
-#include <intviewer/libgviewer.h>
+#include <libgviewer.h>
 
 class ViewerInputModeTest : public ::testing::TestWithParam<const char *> {};
 
diff --git a/tests/iv_textrenderer_test.cc b/tests/iv_textrenderer_test.cc
index ba7875c..be37fc9 100644
--- a/tests/iv_textrenderer_test.cc
+++ b/tests/iv_textrenderer_test.cc
@@ -32,7 +32,7 @@
 #include "gtest/gtest.h"
 #include <intviewer/libgviewer.h>
 
-const gchar *filename = "../INSTALL";
+const gchar *filename = "../README";
 
 ////////////////////////////////////////////////////////////////////////
 
diff --git a/tests/iv_viewerwidget_test.cc b/tests/iv_viewerwidget_test.cc
index 52eb044..a13de4a 100644
--- a/tests/iv_viewerwidget_test.cc
+++ b/tests/iv_viewerwidget_test.cc
@@ -30,9 +30,9 @@
  */
 
 #include "gtest/gtest.h"
-#include <intviewer/libgviewer.h>
+#include <libgviewer.h>
 
-const gchar *filename = "../INSTALL";
+const gchar *filename = "../README";
 
 ////////////////////////////////////////////////////////////////////////
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]