aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_queue_priority.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-15 22:04:17 +0200
committerMax Kellermann <max@duempel.org>2013-10-15 22:47:39 +0200
commit509f8dab8946cfc311def89f62352c0881e73348 (patch)
tree913fbb714704bcffc0ca6b8f44cdfb293ec9ee24 /test/test_queue_priority.cxx
parent77429b6dd35e23efac92630bab35d935b9496345 (diff)
downloadmpd-509f8dab8946cfc311def89f62352c0881e73348.tar.gz
mpd-509f8dab8946cfc311def89f62352c0881e73348.tar.xz
mpd-509f8dab8946cfc311def89f62352c0881e73348.zip
Util/Macros: replacement for GLib's G_N_ELEMENTS()
Diffstat (limited to '')
-rw-r--r--test/test_queue_priority.cxx7
1 files changed, 4 insertions, 3 deletions
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 <glib.h>
@@ -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);
}