TestCompactFormat 测试紧凑格式
(t *testing.T)
| 350 | |
| 351 | // TestCompactFormat 测试紧凑格式 |
| 352 | func TestCompactFormat(t *testing.T) { |
| 353 | svc := NewDefaultCompressionService(nil, 100) |
| 354 | |
| 355 | input := "Line 1 \n Line 2\t \nLine 3" |
| 356 | expected := "Line 1\n Line 2\nLine 3" |
| 357 | |
| 358 | result := svc.compactFormat(input) |
| 359 | if result != expected { |
| 360 | t.Errorf("Expected %q, got %q", expected, result) |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | // generateTestPrompt 生成测试用的 prompt |
| 365 | func generateTestPrompt() string { |
nothing calls this directly
no test coverage detected