deck: Update test after sorting changes

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
Anna Schumaker 2014-01-29 21:06:24 -05:00 committed by Anna Schumaker
parent 63df51a847
commit 8dbb4684c7
3 changed files with 8 additions and 11 deletions

View File

@ -157,8 +157,11 @@ Playqueue *deck :: get_library_pq()
}
#ifdef CONFIG_TEST
static void no_op() {}
void deck :: reset()
{
get_callbacks()->on_queue_changed = no_op;
playqueue_deck.clear();
library_playqueue.reset();
}

View File

@ -98,21 +98,15 @@ void test_5()
deck :: get(2)->set_flag(PQ_ENABLED);
deck :: get(2)->set_flag(PQ_RANDOM);
File f("playqueue.lst", FILE_TYPE_DATA);
print("Saving playqueue deck\n");
f.open(OPEN_WRITE);
deck :: write();
f.close();
print("Clearing deck\n");
deck :: reset();
deck :: print_info();
print("Reading back playqueue deck\n");
f.open(OPEN_READ);
deck :: read();
f.close();
deck :: init();
deck :: print_info();
}

View File

@ -110,10 +110,10 @@ Playing id: 6
Playing id: 7
Playing id: 8
Playing id: 9
Playing id: 0
Playing id: 1
Playing id: 2
Playing id: 3
Playing id: 149
Playing id: 148
Playing id: 147
Playing id: 146
deck[0] = Playqueue { size = 16, flags = 0 }
deck[1] = Playqueue { size = 19, flags = 0 }
deck[2] = Playqueue { size = 15, flags = 0 }