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

Function TestCompactFormat

pkg/compression/service_test.go:352–362  ·  view source on GitHub ↗

TestCompactFormat 测试紧凑格式

(t *testing.T)

Source from the content-addressed store, hash-verified

350
351// TestCompactFormat 测试紧凑格式
352func 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
365func generateTestPrompt() string {

Callers

nothing calls this directly

Calls 2

compactFormatMethod · 0.95

Tested by

no test coverage detected