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.
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}
#include <config.h>
#include "../convert.h"
-#include "../docstring.h"
#include <iostream>
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'
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;
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;
--- /dev/null
+#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;
+ }
+}