Code

stub out heavy routines during svg tests
authorkeescook <keescook@users.sourceforge.net>
Sat, 13 Jan 2007 03:46:21 +0000 (03:46 +0000)
committerkeescook <keescook@users.sourceforge.net>
Sat, 13 Jan 2007 03:46:21 +0000 (03:46 +0000)
src/svg/Makefile_insert
src/svg/test-stubs.cpp [new file with mode: 0644]
src/svg/test-stubs.h [new file with mode: 0644]

index 40af90e65f1fc0d3f08c9eb6290109b1d04d2db9..334957bbf749d01de86d8f255fa25fdaedd1c001 100644 (file)
@@ -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 (file)
index 0000000..e09e031
--- /dev/null
@@ -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 (file)
index 0000000..ab258b3
--- /dev/null
@@ -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 :