From 7b689368f07c7c61c5ef0aed4cb3804f941bb861 Mon Sep 17 00:00:00 2001 From: Nupur Agrawal Date: Fri, 10 Jul 2020 21:18:29 +0530 Subject: [PATCH] fixes hash-test --- stdkiwi/hash_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdkiwi/hash_test.go b/stdkiwi/hash_test.go index a29af5a..53f4a5d 100644 --- a/stdkiwi/hash_test.go +++ b/stdkiwi/hash_test.go @@ -50,7 +50,7 @@ func TestHash(t *testing.T) { t.Errorf("length expected: %d; got %d", length, len(values)) } - if values[0] != "x" || values[1] != "y" { + if !((values[0] == "x" && values[1] == "y") || (values[0] == "y" && values[1] == "x")) { t.Errorf("Get did not return correct value(s)") } @@ -72,7 +72,7 @@ func TestHash(t *testing.T) { t.Errorf("length expected: %d; got %d", length, len(keys)) } - if keys[0] != "a" || keys[1] != "b" { + if !((keys[0] == "a" && keys[1] == "b") || (keys[0] == "b" && keys[1] == "a")) { t.Errorf("Key did not return correct key(s)") }