package threading
import (
"reflect"
"testing"
)
func TestNormalizeMessageID(t *testing.T) {
tests := []struct {
in, want string
}{
{"", ""},
{"", ""},
{"a@b", ""},
}
for _, tc := range tests {
if got := NormalizeMessageID(tc.in); got != tc.want {
t.Fatalf("NormalizeMessageID(%q) = %q, want %q", tc.in, got, tc.want)
}
}
}
func TestParseMessageIDs(t *testing.T) {
got := ParseMessageIDs(" ")
want := []string{"", ""}
if !reflect.DeepEqual(got, want) {
t.Fatalf("ParseMessageIDs() = %v, want %v", got, want)
}
}
func TestBuildReferences(t *testing.T) {
got := BuildReferences("", []string{"", ""})
want := []string{"", "", ""}
if !reflect.DeepEqual(got, want) {
t.Fatalf("BuildReferences() = %v, want %v", got, want)
}
}
func TestBuildReferences_dedupesParent(t *testing.T) {
got := BuildReferences("", []string{"", ""})
want := []string{"", ""}
if !reflect.DeepEqual(got, want) {
t.Fatalf("BuildReferences() = %v, want %v", got, want)
}
}