From e77265b5a14bf58c50b9830b0d2ea57e991f4d2c Mon Sep 17 00:00:00 2001 From: Emir Pasic Date: Thu, 5 Mar 2015 04:16:28 +0100 Subject: [PATCH] - updating red-black tree tests for removal --- trees/redblacktree/redblacktree_test.go | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/trees/redblacktree/redblacktree_test.go b/trees/redblacktree/redblacktree_test.go index d407a76..07472d6 100644 --- a/trees/redblacktree/redblacktree_test.go +++ b/trees/redblacktree/redblacktree_test.go @@ -1,8 +1,25 @@ +/* +Copyright (c) Emir Pasic, All rights reserved. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 3.0 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library. See the file LICENSE included +with this distribution for more information. +*/ + package redblacktree import ( "testing" - "log" ) func TestRedBlackTree(t *testing.T) { @@ -20,6 +37,7 @@ func TestRedBlackTree(t *testing.T) { tree.Put(1, "a") //overwrite // key,expectedValue,expectedFound + tests1 := [][]interface{}{ {1, "a", true}, {2, "b", true}, @@ -40,10 +58,7 @@ func TestRedBlackTree(t *testing.T) { } // removals - log.Println(tree) tree.Remove(5) - log.Println(tree) - tree.Remove(6) tree.Remove(7) tree.Remove(8)