aboutsummaryrefslogtreecommitdiff
path: root/playlist_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'playlist_test.go')
-rw-r--r--playlist_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/playlist_test.go b/playlist_test.go
index 8730737..bb236ee 100644
--- a/playlist_test.go
+++ b/playlist_test.go
@@ -133,3 +133,18 @@ func TestPlAdd3AdjustAdjustPop(t *testing.T) {
t.Fail()
}
}
+
+func TestPlOrderedList(t *testing.T) {
+ var pl Playlist
+ s := NewDummySong("Foo", "Bar")
+ pl.Add(s)
+ l := pl.OrderedList()
+ if len(pl) != len(l) {
+ t.Log("size of pl and ordered list differs")
+ t.Fail()
+ }
+ if pl[0] != l[0] {
+ t.Log("element of pl and ordered list differs")
+ t.Fail()
+ }
+}