From 411533f1a4af5bd2d36eec4d89010490d1b47081 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 18 Jul 2019 11:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DValues=20=E4=BB=8E=E5=A4=A7?= =?UTF-8?q?=E5=88=B0=E5=B0=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- priority_queue/priority_queue_test.go | 4 ++-- priority_queue/vbt.go | 2 +- priority_queuekey/priority_queuekey_test.go | 4 ++-- priority_queuekey/vbt.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/priority_queue/priority_queue_test.go b/priority_queue/priority_queue_test.go index e3f3eb8..dd8abd3 100644 --- a/priority_queue/priority_queue_test.go +++ b/priority_queue/priority_queue_test.go @@ -165,7 +165,7 @@ func TestQueueRemove(t *testing.T) { 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) } } @@ -183,7 +183,7 @@ func TestQueueRemoveIndex(t *testing.T) { 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) } diff --git a/priority_queue/vbt.go b/priority_queue/vbt.go index 13ace44..0a116df 100644 --- a/priority_queue/vbt.go +++ b/priority_queue/vbt.go @@ -249,7 +249,7 @@ func (tree *vbTree) Values() []interface{} { tree.Traversal(func(v interface{}) bool { result = append(result, v) return true - }, LDR) + }, RDL) return result } diff --git a/priority_queuekey/priority_queuekey_test.go b/priority_queuekey/priority_queuekey_test.go index 1429da5..8a242b5 100644 --- a/priority_queuekey/priority_queuekey_test.go +++ b/priority_queuekey/priority_queuekey_test.go @@ -165,7 +165,7 @@ func TestQueueRemove(t *testing.T) { 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) } } @@ -183,7 +183,7 @@ func TestQueueRemoveIndex(t *testing.T) { 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) } diff --git a/priority_queuekey/vbt.go b/priority_queuekey/vbt.go index d2a0bdc..802be1c 100644 --- a/priority_queuekey/vbt.go +++ b/priority_queuekey/vbt.go @@ -249,7 +249,7 @@ func (tree *vbTree) Values() []interface{} { tree.Traversal(func(k, v interface{}) bool { result = append(result, v) return true - }, LDR) + }, RDL) return result }