summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKees Cook <kees@outflux.net>2007-01-13 03:46:21 +0000
committerkeescook <keescook@users.sourceforge.net>2007-01-13 03:46:21 +0000
commitb988aafc72dfee09f3ddcc360938e12be9e33c34 (patch)
tree7c4ba83566a978ec2382f94b101d5d94f8ef85fb /src
parentdrop unneeded ascii fix, breaking tests (diff)
downloadinkscape-b988aafc72dfee09f3ddcc360938e12be9e33c34.tar.gz
inkscape-b988aafc72dfee09f3ddcc360938e12be9e33c34.zip
stub out heavy routines during svg tests
(bzr r2200)
Diffstat (limited to 'src')
-rw-r--r--src/svg/Makefile_insert9
-rw-r--r--src/svg/test-stubs.cpp34
-rw-r--r--src/svg/test-stubs.h30
3 files changed, 69 insertions, 4 deletions
diff --git a/src/svg/Makefile_insert b/src/svg/Makefile_insert
index 40af90e65..334957bbf 100644
--- a/src/svg/Makefile_insert
+++ b/src/svg/Makefile_insert
@@ -45,10 +45,12 @@ svg/test-svg.cpp: $(svg_test_svg_includes) svg/Makefile_insert
svg_test_svg_includes = \
$(srcdir)/svg/css-ostringstream-test.h \
$(srcdir)/svg/stringstream-test.h \
- $(srcdir)/svg/svg-color-test.h
+ $(srcdir)/svg/svg-color-test.h \
+ $(srcdir)/svg/test-stubs.h
svg_libtest_svg_a_SOURCES = \
svg/test-svg.cpp \
+ svg/test-stubs.cpp \
$(svg_test_svg_includes)
svg_test_svg_SOURCES = \
@@ -57,6 +59,5 @@ svg_test_svg_SOURCES = \
svg_test_svg_LDADD = \
svg/libspsvg.a \
- svg/libtest-svg.a \
- libinkpost.a \
- -lglib-2.0
+ svg/libtest-svg.a \
+ $(INKSCAPE_LIBS)
diff --git a/src/svg/test-stubs.cpp b/src/svg/test-stubs.cpp
new file mode 100644
index 000000000..e09e03186
--- /dev/null
+++ b/src/svg/test-stubs.cpp
@@ -0,0 +1,34 @@
+/*
+ * Stub out functions when building tests
+ *
+ * Authors:
+ * Kees Cook <kees@outflux.net>
+ *
+ * Copyright (C) 2007 authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "svg/test-stubs.h"
+
+long long int
+prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def)
+{
+ return def;
+}
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/svg/test-stubs.h b/src/svg/test-stubs.h
new file mode 100644
index 000000000..ab258b383
--- /dev/null
+++ b/src/svg/test-stubs.h
@@ -0,0 +1,30 @@
+/*
+ * Stub out functions when building tests
+ *
+ * Authors:
+ * Kees Cook <kees@outflux.net>
+ *
+ * Copyright (C) 2007 authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef SEEN_TEST_STUBS_H
+#define SEEN_TEST_STUBS_H
+
+#include <glib/gtypes.h>
+
+long long int prefs_get_int_attribute(gchar const *path, gchar const *attr, long long int def);
+
+#endif /* !SEEN_TEST_STUBS_H */
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :