summaryrefslogtreecommitdiffstats
path: root/test/unittest.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2015-05-04 06:39:41 +0000
committerJon A. Cruz <jon@joncruz.org>2015-05-04 06:39:41 +0000
commit3ea82abd61e068d826ff6b7b68a76cb18db5377c (patch)
tree8b458d81b5839c5a12f2ea6b48eaeb0a8f0d9e3b /test/unittest.cpp
parentcmake: fix WITH_GTKSPELL configuration option (diff)
downloadinkscape-3ea82abd61e068d826ff6b7b68a76cb18db5377c.tar.gz
inkscape-3ea82abd61e068d826ff6b7b68a76cb18db5377c.zip
Initialized unit test with gtkmm/glib setup.
(bzr r14104)
Diffstat (limited to 'test/unittest.cpp')
-rw-r--r--test/unittest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unittest.cpp b/test/unittest.cpp
index f95c67d9c..0ec8f0383 100644
--- a/test/unittest.cpp
+++ b/test/unittest.cpp
@@ -11,6 +11,11 @@
#include "gtest/gtest.h"
+#include <gtkmm.h>
+
+#include "inkgc/gc-core.h"
+#include "inkscape.h"
+
namespace {
// Ensure that a known positive test works
@@ -25,6 +30,18 @@ TEST(PreTest, WorldIsSane)
} // namespace
int main(int argc, char **argv) {
+
+ // setup general environment
+#if !GLIB_CHECK_VERSION(2,36,0)
+ g_type_init();
+#endif
+ int tmpArgc = 1;
+ char const *tmp[] = {"foo", ""};
+ char **tmpArgv = const_cast<char **>(tmp);
+ Gtk::Main(tmpArgc, tmpArgv);
+
+ Inkscape::GC::init();
+
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}