[gtksourceview/wip/region-tests: 2/3] test-region: use G_N_ELEMENTS()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/region-tests: 2/3] test-region: use G_N_ELEMENTS()
- Date: Thu, 11 Aug 2016 08:57:20 +0000 (UTC)
commit efc51bc429bfc923b49ab12935dd84e95bf115ff
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Aug 11 10:50:07 2016 +0200
test-region: use G_N_ELEMENTS()
testsuite/test-region.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/testsuite/test-region.c b/testsuite/test-region.c
index 4611740..2111742 100644
--- a/testsuite/test-region.c
+++ b/testsuite/test-region.c
@@ -34,9 +34,7 @@ test_region (void)
guint i;
gchar *region_str = NULL;
-#define NUM_OPS 23
-
- gint ops[NUM_OPS][3] =
+ gint ops[][3] =
{
/* add/remove a 0-length region */
{ 1, 5, 5 },
@@ -82,9 +80,7 @@ test_region (void)
{ 1, 10, 15 },
};
-#define NUM_INTERSECTS 5
-
- gint inter[NUM_INTERSECTS][2] =
+ gint inter[][2] =
{
{ 0, 25 },
{ 10, 15 },
@@ -106,7 +102,7 @@ test_region (void)
g_assert_not_reached ();
}
- for (i = 0; i < NUM_OPS; i++)
+ for (i = 0; i < G_N_ELEMENTS (ops); i++)
{
const gchar *op_name;
@@ -131,7 +127,7 @@ test_region (void)
region_str = NULL;
}
- for (i = 0; i < NUM_INTERSECTS; i++)
+ for (i = 0; i < G_N_ELEMENTS (inter); i++)
{
GtkSourceRegion *intersection;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]