26 lines
849 B
Go
26 lines
849 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestShouldInvokeHumanResponseSkipsDeterministicFastPaths(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
stableConversational bool
|
|
identityReply string
|
|
memoryInstructionReply string
|
|
want bool
|
|
}{
|
|
{name: "stable conversational", stableConversational: true},
|
|
{name: "identity", identityReply: "Меня зовут Домовой."},
|
|
{name: "memory instruction", memoryInstructionReply: "Запомнил."},
|
|
{name: "ordinary continuity", want: true},
|
|
}
|
|
for _, test := range tests {
|
|
t.Run(test.name, func(t *testing.T) {
|
|
if got := shouldInvokeHumanResponse(test.stableConversational, test.identityReply, test.memoryInstructionReply); got != test.want {
|
|
t.Fatalf("shouldInvokeHumanResponse() = %t, want %t", got, test.want)
|
|
}
|
|
})
|
|
}
|
|
}
|