MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestCCache_Generate

Function TestCCache_Generate

configs/ccache_test.go:107–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestCCache_Generate(t *testing.T) {
108 var builder strings.Builder
109 ccache := CCache{}
110
111 if err := ccache.Generate(&builder); err != nil {
112 t.Fatalf("Generate() error = %v", err)
113 }
114
115 out := builder.String()
116 if !strings.Contains(out, "# CCache.") {
117 t.Errorf("output should contain # CCache., got:\n%s", out)
118 }
119 if !strings.Contains(out, "CMAKE_C_COMPILER_LAUNCHER") {
120 t.Errorf("output should set CMAKE_C_COMPILER_LAUNCHER, got:\n%s", out)
121 }
122 if !strings.Contains(out, "CMAKE_CXX_COMPILER_LAUNCHER") {
123 t.Errorf("output should set CMAKE_CXX_COMPILER_LAUNCHER, got:\n%s", out)
124 }
125 if !strings.Contains(out, "ccache") {
126 t.Errorf("output should contain ccache, got:\n%s", out)
127 }
128}

Callers

nothing calls this directly

Calls 2

GenerateMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected