[gnome-settings-daemon] orientation: Use new helper function
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] orientation: Use new helper function
- Date: Thu, 2 Jun 2011 16:48:55 +0000 (UTC)
commit 26a1730572b81b4215d18a194f8488308240ac55
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jun 2 17:46:06 2011 +0100
orientation: Use new helper function
plugins/orientation/test-orientation-calculation.c | 23 +------------------
1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/plugins/orientation/test-orientation-calculation.c b/plugins/orientation/test-orientation-calculation.c
index 0c46d64..1be1255 100644
--- a/plugins/orientation/test-orientation-calculation.c
+++ b/plugins/orientation/test-orientation-calculation.c
@@ -20,25 +20,6 @@ struct {
{ -954, -90, -36, ORIENTATION_LEFT_UP }
};
-static const char *
-orientation_to_string (OrientationUp o)
-{
- switch (o) {
- case ORIENTATION_UNDEFINED:
- return "undefined";
- case ORIENTATION_NORMAL:
- return "normal";
- case ORIENTATION_BOTTOM_UP:
- return "bottom up";
- case ORIENTATION_LEFT_UP:
- return "left up";
- case ORIENTATION_RIGHT_UP:
- return "right up";
- default:
- g_assert_not_reached ();
- }
-}
-
static void
test_no_prev (void)
{
@@ -49,8 +30,8 @@ test_no_prev (void)
const char *got, *expected;
calculated = gsd_orientation_calc (ORIENTATION_UNDEFINED, tests[i].x, tests[i].y, tests[i].z);
- got = orientation_to_string (calculated);
- expected = orientation_to_string (tests[i].o);
+ got = gsd_orientation_to_string (calculated);
+ expected = gsd_orientation_to_string (tests[i].o);
g_assert_cmpstr (got, ==, expected);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]