Commit cbc2990c authored by Dirk McCormick's avatar Dirk McCormick

test: add Peek() ordering test

parent 528751cd
......@@ -58,9 +58,12 @@ func TestCorrectnessOfPop(t *testing.T) {
priorities = append(priorities, i)
peekPriorities = append(peekPriorities, i)
}
if !sort.IntsAreSorted(priorities) {
if !sort.IntsAreSorted(peekPriorities) {
t.Fatal("the values were not returned in sorted order")
}
if !sort.IntsAreSorted(priorities) {
t.Fatal("the popped values were not returned in sorted order")
}
}
func TestUpdate(t *testing.T) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment