MCPcopy Create free account
hub / github.com/atripati/ark / TestGenerateFuncTestFileParam

Function TestGenerateFuncTestFileParam

pkg/runtime/verify_test.go:286–302  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

284}
285
286func TestGenerateFuncTestFileParam(t *testing.T) {
287 fn := FuncSignature{
288 Name: "readCSV",
289 Params: []FuncParam{{Name: "filePath", Type: "string"}},
290 Returns: "([][]string, error)",
291 }
292 test := generateFuncTest(fn)
293 if !strings.Contains(test, "CreateTemp") {
294 t.Error("should create temp file for file path param")
295 }
296 if !strings.Contains(test, "readCSV(") {
297 t.Error("should call readCSV")
298 }
299 if !strings.Contains(test, "Alice") {
300 t.Error("should write test data")
301 }
302}
303
304func TestGenerateFuncTestNonFile(t *testing.T) {
305 fn := FuncSignature{

Callers

nothing calls this directly

Calls 2

generateFuncTestFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected