MCPcopy
hub / github.com/livebud/bud / TestMissingMatchingMethod

Function TestMissingMatchingMethod

framework/generator/generator_test.go:148–163  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

146}
147
148func TestMissingMatchingMethod(t *testing.T) {
149 is := is.New(t)
150 ctx := context.Background()
151 dir := t.TempDir()
152 td := testdir.New(dir)
153 td.Files["generator/web/transform/transform.go"] = `
154 package transform
155 type Generator struct {}
156 func (g *Generator) generate() error { return nil }
157 `
158 is.NoErr(td.Write(ctx))
159 cli := testcli.New(dir)
160 _, err := cli.Run(ctx, "build", "--embed=false")
161 is.NoErr(err)
162 is.NoErr(td.NotExists("bud/command/generate/main"))
163}
164
165func TestSyntaxError(t *testing.T) {
166 is := is.New(t)

Callers

nothing calls this directly

Calls 7

NewFunction · 0.92
NewFunction · 0.92
NewFunction · 0.92
NoErrMethod · 0.80
NotExistsMethod · 0.80
RunMethod · 0.65
WriteMethod · 0.45

Tested by

no test coverage detected