From 509f8dab8946cfc311def89f62352c0881e73348 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2013 22:04:17 +0200 Subject: Util/Macros: replacement for GLib's G_N_ELEMENTS() --- test/test_queue_priority.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/test_queue_priority.cxx') diff --git a/test/test_queue_priority.cxx b/test/test_queue_priority.cxx index 2e544253d..11896978e 100644 --- a/test/test_queue_priority.cxx +++ b/test/test_queue_priority.cxx @@ -2,6 +2,7 @@ #include "Queue.hxx" #include "Song.hxx" #include "Directory.hxx" +#include "util/Macros.hxx" #include @@ -54,10 +55,10 @@ main(gcc_unused int argc, gcc_unused char **argv) struct queue queue(32); - for (unsigned i = 0; i < G_N_ELEMENTS(songs); ++i) + for (unsigned i = 0; i < ARRAY_SIZE(songs); ++i) queue.Append(&songs[i], 0); - assert(queue.GetLength() == G_N_ELEMENTS(songs)); + assert(queue.GetLength() == ARRAY_SIZE(songs)); /* priority=10 for 4 items */ @@ -75,7 +76,7 @@ main(gcc_unused int argc, gcc_unused char **argv) assert(queue.PositionToOrder(i) < 4); } - for (unsigned i = 8; i < G_N_ELEMENTS(songs); ++i) { + for (unsigned i = 8; i < ARRAY_SIZE(songs); ++i) { assert(queue.PositionToOrder(i) >= 4); } -- cgit v1.2.3