Cleanup and committal of ansi table

This commit is contained in:
2022-09-27 00:53:42 -07:00
parent 1dd2bbd0e8
commit edf8f302a1
6 changed files with 151 additions and 43 deletions

View File

@@ -1,4 +1,4 @@
package go_colorhash
package colorhash
import (
"testing"
@@ -10,15 +10,18 @@ func TestHashBytes(t *testing.T) {
}{}
_ = testBytes
}
func TestHashString(t *testing.T) {
testStrings := []struct {
String string
Value int
ID string
}{{String: "", Value: 5472609002491880228, ID: "Empty string"},
}{
{String: "", Value: 5472609002491880228, ID: "Empty string"},
{String: "123", Value: 6449148174219763898, ID: "123"},
{String: "it's as easy as", Value: 5908178111834329190, ID: "easy"},
{String: "hello colorhash", Value: 893132354324239557, ID: "hello"}}
{String: "hello colorhash", Value: 893132354324239557, ID: "hello"},
}
for _, tc := range testStrings {
t.Run(tc.ID, func(t *testing.T) {
hash := HashString(tc.String)