aboutsummaryrefslogtreecommitdiff
path: root/tests/glib-fixture.h
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-10-09 13:44:12 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-10-09 13:44:12 +0000
commitc8edcbeb3add928e37705ec51c8739d953f0d540 (patch)
treefd2bff9b14767a059828dc8460f14b94a98c58cd /tests/glib-fixture.h
parent7eaeb6486f681391b5d5b9a3d15ceeedc4313244 (diff)
parent94ba0a4147052dec53e2ba818ec3d03141e8f26b (diff)
downloadayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.tar.gz
ayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.tar.bz2
ayatana-indicator-display-c8edcbeb3add928e37705ec51c8739d953f0d540.zip
Use com.ubuntu.touch.system's "rotation-lock" boolean for the rotation lock indicator. Fixes: 1378078
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests/glib-fixture.h')
-rw-r--r--tests/glib-fixture.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h
index a8f3a76..65d2921 100644
--- a/tests/glib-fixture.h
+++ b/tests/glib-fixture.h
@@ -17,6 +17,9 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
+#ifndef INDICATOR_TESTS_GLIB_FIXTURE_H
+#define INDICATOR_TESTS_GLIB_FIXTURE_H
+
#include <map>
#include <glib.h>
@@ -52,7 +55,7 @@ class GlibFixture : public ::testing::Test
if (expected_log[level] != n)
for (size_t i=0; i<n; ++i)
- g_message("%d %s", (n+1), v[i].c_str());
+ g_print("%d %s\n", (n+1), v[i].c_str());
}
expected_log.clear();
@@ -64,7 +67,7 @@ class GlibFixture : public ::testing::Test
const gchar * message,
gpointer self)
{
- auto tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message);
+ char* tmp = g_strdup_printf ("%s:%d \"%s\"", log_domain, (int)log_level, message);
static_cast<GlibFixture*>(self)->log[log_level].push_back(tmp);
g_free(tmp);
}
@@ -140,4 +143,10 @@ class GlibFixture : public ::testing::Test
}
GMainLoop * loop;
+
+ public:
+
+ virtual ~GlibFixture() =default;
};
+
+#endif /* INDICATOR_TESTS_GLIB_FIXTURE_H */