]> git.lyx.org Git - lyx.git/commitdiff
Fix make check target
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Oct 2012 09:55:23 +0000 (11:55 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 5 Oct 2012 09:55:23 +0000 (11:55 +0200)
A dummy getGuiMessages function was missing. Instead of adding it everywhere, a new file is created that contains all the dummy functions needed by the tests.

src/support/Makefile.am
src/support/tests/check_convert.cpp
src/support/tests/check_filetools.cpp
src/support/tests/check_lstrings.cpp
src/support/tests/dummy_functions.cpp [new file with mode: 0644]

index 2418168f0e735db29abd20f56ad2eb56da5d2d31..dc317c0c0179e28bb255a01a81b6f955e273558b 100644 (file)
@@ -156,18 +156,21 @@ check_convert_LDADD = liblyxsupport.a $(INTLLIBS) $(LIBICONV) $(BOOST_LIBS) $(QT
 check_convert_LDFLAGS = $(QT4_LDFLAGS)
 check_convert_SOURCES = \
        tests/check_convert.cpp \
+       tests/dummy_functions.cpp \
        tests/boost.cpp
 
 check_filetools_LDADD = liblyxsupport.a $(INTLLIBS) $(LIBICONV) $(BOOST_LIBS) $(QT4_CORE_LIBS) $(LIBSHLWAPI)
 check_filetools_LDFLAGS = $(QT4_CORE_LDFLAGS)
 check_filetools_SOURCES = \
        tests/check_filetools.cpp \
+       tests/dummy_functions.cpp \
        tests/boost.cpp
 
 check_lstrings_LDADD = liblyxsupport.a $(INTLLIBS) $(LIBICONV) $(BOOST_LIBS) $(QT4_CORE_LIBS) $(LIBSHLWAPI)
 check_lstrings_LDFLAGS = $(QT4_CORE_LDFLAGS)
 check_lstrings_SOURCES = \
        tests/check_lstrings.cpp \
+       tests/dummy_functions.cpp \
        tests/boost.cpp
 
 makeregfiles: ${check_PROGRAMS}
index 30ea64725016ced533e43654e6274a171abc4bcc..1e12a4612141f5de0e139d1db4fa70168ddfff32 100644 (file)
@@ -1,7 +1,6 @@
 #include <config.h>
 
 #include "../convert.h"
-#include "../docstring.h"
 
 #include <iostream>
 
@@ -9,18 +8,6 @@ using lyx::convert;
 
 using namespace std;
 
-
-namespace lyx {
-       // Dummy LyXRC support
-       struct LyXRC { string icon_set; } lyxrc;
-
-       // Keep the linker happy on Windows
-       void lyx_exit(int) {}
-
-       docstring const _(string const & s) { return from_ascii(s); }
-}
-
-
 void convert_int()
 {
        cout << convert<int>("123") << '\n'
index 7da548abd762a75219fd53b8b75fb76e8f0edab5..ad657facb100bc63be19600beb70c772e3f55e5f 100644 (file)
@@ -10,16 +10,6 @@ using namespace lyx::support;
 
 using namespace std;
 
-namespace lyx {
-       // Dummy LyXRC support
-       struct LyXRC { string icon_set; } lyxrc;
-
-       // Keep the linker happy on Windows
-       void lyx_exit(int) {}
-
-       docstring const _(string const & s) { return from_ascii(s); }
-}
-
 void test_normalizePath()
 {
        cout << FileName("/foo/../bar").absFileName() << endl;
index 8a4aea84fd93597d334009cf165848a7b984ad31..3509e45e897bc4660330c0c2ce6bd4268f65d4bd 100644 (file)
@@ -10,16 +10,6 @@ using namespace lyx;
 
 using namespace std;
 
-namespace lyx {
-       // Dummy LyXRC support
-       struct LyXRC { string icon_set; } lyxrc;
-
-       // Keep the linker happy on Windows
-       void lyx_exit(int) {}
-
-       docstring const _(string const & s) { return from_ascii(s); }
-}
-
 void test_lowercase()
 {
        cout << to_ascii(docstring(1, lowercase(char_type('A')))) << endl;
diff --git a/src/support/tests/dummy_functions.cpp b/src/support/tests/dummy_functions.cpp
new file mode 100644 (file)
index 0000000..229198e
--- /dev/null
@@ -0,0 +1,23 @@
+#include <config.h>
+
+#include "../Messages.h"
+
+using namespace std;
+
+namespace lyx {
+       // Dummy LyXRC support
+       struct LyXRC { string icon_set; } lyxrc;
+
+       // Keep the linker happy on Windows
+       void lyx_exit(int) {}
+
+       docstring const _(string const & s) { return from_ascii(s); }
+
+       // Dummy language support
+       Messages const & getGuiMessages()
+       {
+               static Messages lyx_messages;
+
+               return lyx_messages;
+       }
+}