From 460f8cc1f9e58f81566f289e5e01e8e598f38228 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Oct 2014 14:48:37 -0500 Subject: replace 'orientation-lock' enum with 'rotation-lock' bool --- tests/manual | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') 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
-
On the phone, enable the orientation lock in ubuntu-system-settings.
+
On the phone, enable the rotation lock in ubuntu-system-settings.
The rotation lock indicator should appear, and its switch menuitem should be set to 'true'.
-
NOTE: Current builds this is broken, until it is fixed in system settings you can set it with: gsettings set com.ubuntu.touch.system orientation-lock 'LandscapeOrientation'
-
With the orientation locked, click on the indicator's switch menuitem to toggle from locked to unlocked. +
With the rotation locked, click on the indicator's switch menuitem to toggle from locked to unlocked.
The rotation lock indicator should disappear
-
In ubuntu-system-settings, the orientation lock control should change to 'none'.
-
NOTE: Current builds this is broken, until it is fixed in system settings you can get it with: gsettings get com.ubuntu.touch.system orientation-lock
+
In ubuntu-system-settings, the rotation lock control should change to 'none'.
-- cgit v1.2.3 From 5e05830765bdcae09db297918d3aa0620371ccf3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Oct 2014 14:54:15 -0500 Subject: fix warnings reported by flint++ -- explicit ctors, classes with virtual methods but no virtual dtor, #ifdef include guards --- tests/glib-fixture.h | 9 +++++++++ tests/gtestdbus-fixture.h | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index a8f3a76..d60a038 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -17,6 +17,9 @@ * Charles Kerr */ +#ifndef INDICATOR_TESTS_GLIB_FIXTURE_H +#define INDICATOR_TESTS_GLIB_FIXTURE_H + #include #include @@ -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 */ +#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& service_dirs_in): service_dirs(service_dirs_in) {} + explicit GTestDBusFixture(const std::vector& 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 */ -- cgit v1.2.3 From cd87a58b8d7478f00b10465702a169fe92cc2dd7 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Oct 2014 15:01:11 -0500 Subject: fix oops --- tests/glib-fixture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index d60a038..a3e9605 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -146,7 +146,7 @@ class GlibFixture : public ::testing::Test public: - virtual ~GLibFixture() =default; + virtual ~GlibFixture() =default; }; #endif /* INDICATOR_TESTS_GLIB_FIXTURE_H */ -- cgit v1.2.3 From 7f952611ac4ef3eaed1eef9bc86be955ff66ef2a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 6 Oct 2014 15:20:50 -0500 Subject: report unexpected g_log() calls via g_print() instead of g_log() :D --- tests/glib-fixture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index a3e9605..a5da2f5 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -55,7 +55,7 @@ class GlibFixture : public ::testing::Test if (expected_log[level] != n) for (size_t i=0; i Date: Mon, 6 Oct 2014 15:57:13 -0500 Subject: don't use 'auto tmp = ...' when tmp is going to be passed to g_free() --- tests/glib-fixture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/glib-fixture.h b/tests/glib-fixture.h index a5da2f5..65d2921 100644 --- a/tests/glib-fixture.h +++ b/tests/glib-fixture.h @@ -67,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(self)->log[log_level].push_back(tmp); g_free(tmp); } -- cgit v1.2.3