MCPcopy
hub / github.com/google/mangle / TestDeclPackageDecl

Function TestDeclPackageDecl

ast/ast_test.go:587–601  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

585}
586
587func TestDeclPackageDecl(t *testing.T) {
588 tests := []string{
589 "foo", "foo.bar", "foo.baz.bar",
590 }
591 for _, test := range tests {
592 decl := Decl{
593 DeclaredAtom: NewAtom("Package"),
594 Descr: []Atom{NewAtom("name", String(test))},
595 }
596
597 if got := decl.PackageID(); got != test {
598 t.Fatalf("PackageID(%v)=%v want %v", decl, got, test)
599 }
600 }
601}
602
603func TestDeclVisible(t *testing.T) {
604 tests := []struct {

Callers

nothing calls this directly

Calls 3

PackageIDMethod · 0.95
NewAtomFunction · 0.85
StringFunction · 0.85

Tested by

no test coverage detected