deck: Update test after sorting changes
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This commit is contained in:
parent
63df51a847
commit
8dbb4684c7
|
@ -157,8 +157,11 @@ Playqueue *deck :: get_library_pq()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_TEST
|
#ifdef CONFIG_TEST
|
||||||
|
static void no_op() {}
|
||||||
|
|
||||||
void deck :: reset()
|
void deck :: reset()
|
||||||
{
|
{
|
||||||
|
get_callbacks()->on_queue_changed = no_op;
|
||||||
playqueue_deck.clear();
|
playqueue_deck.clear();
|
||||||
library_playqueue.reset();
|
library_playqueue.reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,21 +98,15 @@ void test_5()
|
||||||
deck :: get(2)->set_flag(PQ_ENABLED);
|
deck :: get(2)->set_flag(PQ_ENABLED);
|
||||||
deck :: get(2)->set_flag(PQ_RANDOM);
|
deck :: get(2)->set_flag(PQ_RANDOM);
|
||||||
|
|
||||||
File f("playqueue.lst", FILE_TYPE_DATA);
|
|
||||||
|
|
||||||
print("Saving playqueue deck\n");
|
print("Saving playqueue deck\n");
|
||||||
f.open(OPEN_WRITE);
|
|
||||||
deck :: write();
|
deck :: write();
|
||||||
f.close();
|
|
||||||
|
|
||||||
print("Clearing deck\n");
|
print("Clearing deck\n");
|
||||||
deck :: reset();
|
deck :: reset();
|
||||||
deck :: print_info();
|
deck :: print_info();
|
||||||
|
|
||||||
print("Reading back playqueue deck\n");
|
print("Reading back playqueue deck\n");
|
||||||
f.open(OPEN_READ);
|
deck :: init();
|
||||||
deck :: read();
|
|
||||||
f.close();
|
|
||||||
|
|
||||||
deck :: print_info();
|
deck :: print_info();
|
||||||
}
|
}
|
||||||
|
|
|
@ -110,10 +110,10 @@ Playing id: 6
|
||||||
Playing id: 7
|
Playing id: 7
|
||||||
Playing id: 8
|
Playing id: 8
|
||||||
Playing id: 9
|
Playing id: 9
|
||||||
Playing id: 0
|
Playing id: 149
|
||||||
Playing id: 1
|
Playing id: 148
|
||||||
Playing id: 2
|
Playing id: 147
|
||||||
Playing id: 3
|
Playing id: 146
|
||||||
deck[0] = Playqueue { size = 16, flags = 0 }
|
deck[0] = Playqueue { size = 16, flags = 0 }
|
||||||
deck[1] = Playqueue { size = 19, flags = 0 }
|
deck[1] = Playqueue { size = 19, flags = 0 }
|
||||||
deck[2] = Playqueue { size = 15, flags = 0 }
|
deck[2] = Playqueue { size = 15, flags = 0 }
|
||||||
|
|
Loading…
Reference in New Issue