MCPcopy Create free account
hub / github.com/goadesign/goa / TestBasicUsage

Function TestBasicUsage

codegen/testutil/example_test.go:11–22  ·  view source on GitHub ↗

Example: Basic usage with AssertString

(t *testing.T)

Source from the content-addressed store, hash-verified

9
10// Example: Basic usage with AssertString
11func TestBasicUsage(t *testing.T) {
12 // Generate some code
13 code := `package main
14
15func main() {
16 fmt.Println("Hello, World!")
17}
18`
19
20 // Compare with golden file
21 testutil.AssertString(t, "testdata/golden/hello_world.go.golden", code)
22}
23
24// Example: Format-aware comparisons
25func TestFormatAwareComparisons(t *testing.T) {

Callers

nothing calls this directly

Calls 1

AssertStringFunction · 0.92

Tested by

no test coverage detected