aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/glib-fixture.h13
-rw-r--r--tests/gtestdbus-fixture.h10
-rw-r--r--tests/manual8
3 files changed, 22 insertions, 9 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 */
diff --git a/tests/gtestdbus-fixture.h b/tests/gtestdbus-fixture.h
index 541050e..c592033 100644
--- a/tests/gtestdbus-fixture.h
+++ b/tests/gtestdbus-fixture.h
@@ -17,6 +17,9 @@
* Charles Kerr <charles.kerr@canonical.com>
*/
+#ifndef INDICATOR_TESTS_GTESTDBUS_FIXTURE_H
+#define INDICATOR_TESTS_GTESTDBUS_FIXTURE_H
+
#include "glib-fixture.h"
/***
@@ -27,9 +30,10 @@ class GTestDBusFixture: public GlibFixture
{
public:
- GTestDBusFixture() {}
+ GTestDBusFixture() =default;
+ virtual ~GTestDBusFixture() =default;
- GTestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {}
+ explicit GTestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {}
private:
@@ -100,3 +104,5 @@ class GTestDBusFixture: public GlibFixture
super::TearDown();
}
};
+
+#endif /* INDICATOR_TESTS_GTESTDBUS_FIXTURE_H */
diff --git a/tests/manual b/tests/manual
index ff283cb..2de2d89 100644
--- a/tests/manual
+++ b/tests/manual
@@ -1,14 +1,12 @@
Test-case indicator-display/rotation-indicator
<dl>
- <dt>On the phone, enable the orientation lock in ubuntu-system-settings.</dt>
+ <dt>On the phone, enable the rotation lock in ubuntu-system-settings.</dt>
<dd>The rotation lock indicator should appear, and its switch menuitem should be set to 'true'.</dd>
- <dd>NOTE: Current builds this is broken, until it is fixed in system settings you can set it with: <tt>gsettings set com.ubuntu.touch.system orientation-lock 'LandscapeOrientation'</tt></dd>
- <dt>With the orientation locked, click on the indicator's switch menuitem to toggle from locked to unlocked.</dd>
+ <dt>With the rotation locked, click on the indicator's switch menuitem to toggle from locked to unlocked.</dd>
<dd>The rotation lock indicator should disappear</dd>
- <dd>In ubuntu-system-settings, the orientation lock control should change to 'none'.</dd>
- <dd>NOTE: Current builds this is broken, until it is fixed in system settings you can get it with: <tt>gsettings get com.ubuntu.touch.system orientation-lock</tt></dd>
+ <dd>In ubuntu-system-settings, the rotation lock control should change to 'none'.</dd>
</dl>