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

Function TestHeader

codegen/sections_test.go:14–124  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12}
13
14func TestHeader(t *testing.T) {
15 const (
16 title = "test title"
17 noTitleHeader = `package testpackage
18
19`
20 singleImportHeader = `package testpackage
21
22import "test"
23
24`
25 manyImportsHeader = `package testpackage
26
27import (
28 "test"
29 "other"
30)
31
32`
33
34 pathImportHeader = `package testpackage
35
36import "import/with/slashes"
37
38`
39
40 pathImportsHeader = `package testpackage
41
42import (
43 "import/with/slashes"
44 "other/import/with/slashes"
45)
46
47`
48
49 pathNamedImportHeader = `package testpackage
50
51import myname "import/with/slashes"
52
53`
54 pathNamedImportsHeader = `package testpackage
55
56import (
57 myname "import/with/slashes"
58 myothername "other/import/with/slashes"
59)
60
61`
62 )
63 var (
64 titleHeader = `// Code generated by goa, DO NOT EDIT.
65//
66// test title
67//
68// Command:
69// goa
70
71package testpackage

Callers

nothing calls this directly

Calls 5

normalizeLineEndingsFunction · 0.85
HeaderFunction · 0.70
StringMethod · 0.65
RunMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected