MCPcopy Create free account
hub / github.com/astercloud/aster / TestCompactFormat

Function TestCompactFormat

pkg/agent/prompt_compression_test.go:279–289  ·  view source on GitHub ↗

TestCompactFormat 测试紧凑格式

(t *testing.T)

Source from the content-addressed store, hash-verified

277
278// TestCompactFormat 测试紧凑格式
279func 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 测试提取段落标题
292func TestExtractSectionTitle(t *testing.T) {

Callers

nothing calls this directly

Calls 1

compactFormatMethod · 0.95

Tested by

no test coverage detected