1234567891011121314151617181920212223 |
- package mishmash
-
- import (
- "fmt"
- "testing"
- )
-
- func TestMishmashString(t *testing.T) {
- want := "9d923077"
- if got := fmt.Sprintf("%08x", Mishmash([]byte("google.com"))); want != got {
- t.Error("Parse() = got", got, "want", want)
- } else {
- fmt.Println("TestMishmashString passed")
- }
- }
- func TestMishmashUint32(t *testing.T) {
- var want uint32 = 2643603575
- if got := Mishmash([]byte("google.com")); want != got {
- t.Error("Parse() = got", got, "want", want)
- } else {
- fmt.Println("TestMishmashUint32 passed")
- }
- }
|