TestCompactFormat 测试紧凑格式
(t *testing.T)
| 277 | |
| 278 | // TestCompactFormat 测试紧凑格式 |
| 279 | func TestCompactFormat(t *testing.T) { |
| 280 | compressor := &EnhancedPromptCompressor{} |
| 281 | |
| 282 | input := "Line 1 \n Line 2\t \nLine 3" |
| 283 | expected := "Line 1\n Line 2\nLine 3" |
| 284 | |
| 285 | result := compressor.compactFormat(input) |
| 286 | if result != expected { |
| 287 | t.Errorf("Expected %q, got %q", expected, result) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | // TestExtractSectionTitle 测试提取段落标题 |
| 292 | func TestExtractSectionTitle(t *testing.T) { |
nothing calls this directly
no test coverage detected