[gnome-commander/googletest] Execute g_type_init() in all tests if glib is older than 2.36.0



commit e5a23dd1aefc898b1062956549f78d3c771f7a07
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Wed Dec 2 20:54:29 2015 +0100

    Execute g_type_init() in all tests if glib is older than 2.36.0

 tests/gcmd_tests_main.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/gcmd_tests_main.cc b/tests/gcmd_tests_main.cc
index 55cbffe..5501cf2 100644
--- a/tests/gcmd_tests_main.cc
+++ b/tests/gcmd_tests_main.cc
@@ -22,8 +22,11 @@
  */
 
  #include "gtest/gtest.h"
+ #include <glib-object.h>
 
 int main(int argc, char **argv) {
+  if (glib_check_version (2, 36, 0) != NULL)
+    g_type_init ();
   ::testing::InitGoogleTest(&argc, argv);
   return RUN_ALL_TESTS();
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]