You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: visitor_test.go
    path of file: ./repos/protoreflect/desc/protoparse/ast
    
    the code of the file until where you have to start completion: package ast

import (
	"sort"
	"testing"

	"github.com/jhump/protoreflect/internal/testutil"
)

// The single visitor returned has all functions set to record the method call.
// The slice of visitors has one element per function, each with exactly one
// function set. So the first visitor can be used to determine the preferred
// function (which should match the node's concrete type). The slice of visitors
// can be used to enumerate ALL matching function calls.
//
// This function is generated via commented-out code at the bottom of this file.
func testVisitors(methodCalled *string) (*Visitor, []*Visitor) {
	v := &Visitor{
		VisitEnumNode: func(*EnumNode) (bool, *Visitor) {
			*methodCalled = "*EnumNode"
			return false, nil
		},
		VisitEnumValueNode: func(*EnumValueNode) (bool, *Visitor) {
			*methodCalled = "*EnumValueNode"
			return false, nil
		},
		VisitFieldDeclNode: func(FieldDeclNode) (bool, *Visitor) {
			*methodCalled = "FieldDeclNode"
			return false, nil
		},
		VisitFieldNode: func(*FieldNode) (bool, *Visitor) {
			*methodCalled = "*FieldNode"
			return false, nil
		},
		VisitGroupNode: func(*GroupNode) (bool, *Visitor) {
			*methodCalled = "*GroupNode"
			return false, nil
		},
		VisitOneOfNode: func(*OneOfNode) (bool, *Visitor) {
			*methodCalled = "*OneOfNode"
			return false, nil
		},
		VisitMapTypeNode: func(*MapTypeNode) (bool, *Visitor) {
			*methodCalled = "*MapTypeNode"
			return false, nil
		},
		VisitMapFieldNode: func(*MapFieldNode) (bool, *Visitor) {
			*methodCalled = "*MapFieldNode"
			return false, nil
		},
		VisitFileNode: func(*FileNode) (bool, *Visitor) {
			*methodCalled = "*FileNode"
			return false, nil
		},
		VisitSyntaxNode: func(*SyntaxNode) (bool, *Visitor) {
			*methodCalled = "*SyntaxNode"
			return false, nil
		},
		VisitImportNode: func(*ImportNode) (bool, *Visitor) {
			*methodCalled = "*ImportNode"
			return false, nil
		},
		VisitPackageNode: func(*PackageNode) (bool, *Visitor) {
			*methodCalled = "*PackageNode"
			return false, nil
		},
		VisitIdentValueNode: func(IdentValueNode) (bool, *Visitor) {
			*methodCalled = "IdentValueNode"
			return false, nil
		},
		VisitIdentNode: func(*IdentNode) (bool, *Visitor) {
			*methodCalled = "*IdentNode"
			return false, nil
		},
		VisitCompoundIdentNode: func(*CompoundIdentNode) (bool, *Visitor) {
			*methodCalled = "*CompoundIdentNode"
			return false, nil
		},
		VisitKeywordNode: func(*KeywordNode) (bool, *Visitor) {
			*methodCalled = "*KeywordNode"
			return false, nil
		},
		VisitMessageDeclNode: func(MessageDeclNode) (bool, *Visitor) {
			*methodCalled = "MessageDeclNode"
			return false, nil
		},
		VisitMessageNode: func(*MessageNode) (bool, *Visitor) {
			*methodCalled = "*MessageNode"
			return false, nil
		},
		VisitExtendNode: func(*ExtendNode) (bool, *Visitor) {
			*methodCalled = "*ExtendNode"
			return false, nil
		},
		VisitNode: func(Node) (bool, *Visitor) {
			*methodCalled = "Node"
			return false, nil
		},
		VisitTerminalNode: func(TerminalNode) (bool, *Visitor) {
			*methodCalled = "TerminalNode"
			ret
    
func TestVisitorAll(t *testing.T) {
	testCases := map[Node][]string{
		(*EnumNode)(nil): {
			"*EnumNode", "CompositeNode", "Node",
		},
		(*EnumValueNode)(nil): {
			"*EnumValueNode", "CompositeNode", "Node",
		},
		(*FieldNode)(nil): {
			"*FieldNode", "FieldDeclNode", "CompositeNode", "Node",
		},
		(*GroupNode)(nil): {
			"*GroupNode", "FieldDeclNode", "MessageDeclNode", "CompositeNode", "Node",
		},
		(*OneOfNode)(nil): {
			"*OneOfNode", "CompositeNode", "Node",
		},
		(*MapTypeNode)(nil): {
			"*MapTypeNode", "CompositeNode", "Node",
		},
		(*MapFieldNode)(nil): {
			"*MapFieldNode", "FieldDeclNode", "MessageDeclNode", "CompositeNode", "Node",
		},
		(*FileNode)(nil): {
			"*FileNode", "CompositeNode", "Node",
		},
		(*SyntaxNode)(nil): {
			"*SyntaxNode", "CompositeNode", "Node",
		},
		(*ImportNode)(nil): {
			"*ImportNode", "CompositeNode", "Node",
		},
		(*PackageNode)(nil): {
			"*PackageNode", "CompositeNode", "Node",
		},
		(*IdentNode)(nil): {
			"*IdentNode", "ValueNode", "IdentValueNode", "TerminalNode", "Node",
		},
		(*CompoundIdentNode)(nil): {
			"*CompoundIdentNode", "ValueNode", "IdentValueNode", "CompositeNode", "Node",
		},
		(*KeywordNode)(nil): {
			"*KeywordNode", "TerminalNode", "Node",
		},
		(*MessageNode)(nil): {
			"*MessageNode", "MessageDeclNode", "CompositeNode", "Node",
		},
		(*ExtendNode)(nil): {
			"*ExtendNode", "CompositeNode", "Node",
		},
		(*RuneNode)(nil): {
			"*RuneNode", "TerminalNode", "Node",
		},
		(*EmptyDeclNode)(nil): {
			"*EmptyDeclNode", "CompositeNode", "Node",
		},
		(*OptionNode)(nil): {
			"*OptionNode", "CompositeNode", "Node",
		},
		(*OptionNameNode)(nil): {
			"*OptionNameNode", "CompositeNode", "Node",
		},
		(*FieldReferenceNode)(nil): {
			"*FieldReferenceNode", "CompositeNode", "Node",
		},
		(*CompactOptionsNode)(nil): {
			"*CompactOptionsNode", "CompositeNode", "Node",
		},
		(*ExtensionRangeNode)(nil): {
			"*ExtensionRangeNode", "CompositeNode", "Node",
		},
		(*RangeNode)(nil): {
			"*RangeNode", "CompositeNode", "Node",
		},
		(*ReservedNode)(nil): {
			"*ReservedNode", "CompositeNode", "Node",
		},
		(*ServiceNode)(nil): {
			"*ServiceNode", "CompositeNode", "Node",
		},
		(*RPCNode)(nil): {
			"*RPCNode", "CompositeNode", "Node",
		},
		(*RPCTypeNode)(nil): {
			"*RPCTypeNode", "CompositeNode", "Node",
		},
		(*StringLiteralNode)(nil): {
			"*StringLiteralNode", "ValueNode", "StringValueNode", "TerminalNode", "Node",
		},
		(*CompoundStringLiteralNode)(nil): {
			"*CompoundStringLiteralNode", "ValueNode", "StringValueNode", "CompositeNode", "Node",
		},
		(*UintLiteralNode)(nil): {
			"*UintLiteralNode", "ValueNode", "IntValueNode", "FloatValueNode", "TerminalNode", "Node",
		},
		(*PositiveUintLiteralNode)(nil): {
			"*PositiveUintLiteralNode", "ValueNode", "IntValueNode", "CompositeNode", "Node",
		},
		(*NegativeIntLiteralNode)(nil): {
			"*NegativeIntLiteralNode", "ValueNode", "IntValueNode", "CompositeNode", "Node",
		},
		(*FloatLiteralNode)(nil): {
			"*FloatLiteralNode", "ValueNode", "FloatValueNode", "TerminalNode", "Node",
		},
		(*SpecialFloatLiteralNode)(nil): {
			"*SpecialFloatLiteralNode", "ValueNode", "FloatValueNode", "TerminalNode", "Node",
		},
		(*SignedFloatLiteralNode)(nil): {
			"*SignedFloatLiteralNode", "ValueNode", "FloatValueNode", "CompositeNode", "Node",
		},
		(*BoolLiteralNode)(nil): {
			"*BoolLiteralNode", "ValueNode", "TerminalNode", "Node",
		},
		(*ArrayLiteralNode)(nil): {
			"*ArrayLiteralNode", "ValueNode", "CompositeNode", "Node",
		},
		(*MessageLiteralNode)(nil): {
			"*MessageLiteralNode", "ValueNode", "CompositeNode", "Node",
		},
		(*MessageFieldNode)(nil): {
			"*MessageFieldNode", "CompositeNode", "Node",
		},
	}

	for n, expectedCalls := range testCases {
		var call string
		v, all := testVisitors(&call)
		_, _ = v.Visit(n)
		testutil.Eq(t, expectedCalls[0], call)
		var allCalls []string
		for _, v := range all {
			call = ""
			_, _ = v.Visit(n)
			if call != "" {
				allCalls = append(allCalls, call)
			}
		}
		sort.Strings(allCalls)
		sort.Strings(expectedCalls)
		testutil.Eq(t, expectedCalls, allCalls)
	}
}