修复Values 从大到小.
This commit is contained in:
parent
16f40b7016
commit
411533f1a4
|
@ -165,7 +165,7 @@ func TestQueueRemove(t *testing.T) {
|
||||||
content += spew.Sprint(pq.Values())
|
content += spew.Sprint(pq.Values())
|
||||||
}
|
}
|
||||||
|
|
||||||
if content != "[1 4 10 53 78 90][1 4 53 78 90][1 4 78 90][1 4 90][1 4][4][]" {
|
if content != "[90 78 53 10 4 1][90 78 53 4 1][90 78 4 1][90 4 1][4 1][4][]" {
|
||||||
t.Error(content)
|
t.Error(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ func TestQueueRemoveIndex(t *testing.T) {
|
||||||
content += spew.Sprint(pq.Values())
|
content += spew.Sprint(pq.Values())
|
||||||
}
|
}
|
||||||
|
|
||||||
if content != "[1 4 10 32 53 78][1 4 10 32 53][1 4 10 32][1 4 10][1 4][1][]" {
|
if content != "[78 53 32 10 4 1][53 32 10 4 1][32 10 4 1][10 4 1][4 1][1][]" {
|
||||||
t.Error(content)
|
t.Error(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ func (tree *vbTree) Values() []interface{} {
|
||||||
tree.Traversal(func(v interface{}) bool {
|
tree.Traversal(func(v interface{}) bool {
|
||||||
result = append(result, v)
|
result = append(result, v)
|
||||||
return true
|
return true
|
||||||
}, LDR)
|
}, RDL)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,7 +165,7 @@ func TestQueueRemove(t *testing.T) {
|
||||||
content += spew.Sprint(pq.Values())
|
content += spew.Sprint(pq.Values())
|
||||||
}
|
}
|
||||||
|
|
||||||
if content != "[1 4 10 53 78 90][1 4 53 78 90][1 4 78 90][1 4 90][1 4][4][]" {
|
if content != "[90 78 53 10 4 1][90 78 53 4 1][90 78 4 1][90 4 1][4 1][4][]" {
|
||||||
t.Error(content)
|
t.Error(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ func TestQueueRemoveIndex(t *testing.T) {
|
||||||
content += spew.Sprint(pq.Values())
|
content += spew.Sprint(pq.Values())
|
||||||
}
|
}
|
||||||
|
|
||||||
if content != "[1 4 10 32 53 78][1 4 10 32 53][1 4 10 32][1 4 10][1 4][1][]" {
|
if content != "[78 53 32 10 4 1][53 32 10 4 1][32 10 4 1][10 4 1][4 1][1][]" {
|
||||||
t.Error(content)
|
t.Error(content)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ func (tree *vbTree) Values() []interface{} {
|
||||||
tree.Traversal(func(k, v interface{}) bool {
|
tree.Traversal(func(k, v interface{}) bool {
|
||||||
result = append(result, v)
|
result = append(result, v)
|
||||||
return true
|
return true
|
||||||
}, LDR)
|
}, RDL)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user