package coordinator import "testing" func TestIsRealtimeInformationQuery(t *testing.T) { positives := []string{ "今天北京天气怎么样", "明天会下雨吗", "外面气温多少", "今天有什么新闻", "美元汇率多少", "查一下实时股价", } for _, in := range positives { if !IsRealtimeInformationQuery(in) { t.Fatalf("expected realtime query: %q", in) } } negatives := []string{ "", "a", "项目进度怎么样", "型检温度指标怎么定", "注册路径需要注意什么", "帮我推进 V0.5 方案", "你好", } for _, in := range negatives { if IsRealtimeInformationQuery(in) { t.Fatalf("did not expect realtime query: %q", in) } } }