// Code generated by astcast_generate.go; DO NOT EDIT

package astcast

import (
	"go/ast"
	"testing"
)

func TestToArrayType(t *testing.T) {
	// Test successfull cast.
	if x := ToArrayType(&ast.ArrayType{}); x == NilArrayType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToArrayType(nil); x != NilArrayType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToArrayType(&ast.Ident{}); x != NilArrayType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBadExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToBadExpr(&ast.BadExpr{}); x == NilBadExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBadExpr(nil); x != NilBadExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBadExpr(&ast.Ident{}); x != NilBadExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBasicLit(t *testing.T) {
	// Test successfull cast.
	if x := ToBasicLit(&ast.BasicLit{}); x == NilBasicLit || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBasicLit(nil); x != NilBasicLit {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBasicLit(&ast.Ident{}); x != NilBasicLit || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBinaryExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToBinaryExpr(&ast.BinaryExpr{}); x == NilBinaryExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBinaryExpr(nil); x != NilBinaryExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBinaryExpr(&ast.Ident{}); x != NilBinaryExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToCallExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToCallExpr(&ast.CallExpr{}); x == NilCallExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToCallExpr(nil); x != NilCallExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToCallExpr(&ast.Ident{}); x != NilCallExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToChanType(t *testing.T) {
	// Test successfull cast.
	if x := ToChanType(&ast.ChanType{}); x == NilChanType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToChanType(nil); x != NilChanType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToChanType(&ast.Ident{}); x != NilChanType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToCompositeLit(t *testing.T) {
	// Test successfull cast.
	if x := ToCompositeLit(&ast.CompositeLit{}); x == NilCompositeLit || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToCompositeLit(nil); x != NilCompositeLit {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToCompositeLit(&ast.Ident{}); x != NilCompositeLit || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToEllipsis(t *testing.T) {
	// Test successfull cast.
	if x := ToEllipsis(&ast.Ellipsis{}); x == NilEllipsis || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToEllipsis(nil); x != NilEllipsis {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToEllipsis(&ast.Ident{}); x != NilEllipsis || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToFuncLit(t *testing.T) {
	// Test successfull cast.
	if x := ToFuncLit(&ast.FuncLit{}); x == NilFuncLit || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToFuncLit(nil); x != NilFuncLit {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToFuncLit(&ast.Ident{}); x != NilFuncLit || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToFuncType(t *testing.T) {
	// Test successfull cast.
	if x := ToFuncType(&ast.FuncType{}); x == NilFuncType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToFuncType(nil); x != NilFuncType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToFuncType(&ast.Ident{}); x != NilFuncType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToIdent(t *testing.T) {
	// Test successfull cast.
	if x := ToIdent(&ast.Ident{}); x == NilIdent || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToIdent(nil); x != NilIdent {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToIdent(&ast.CallExpr{}); x != NilIdent || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToIndexExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToIndexExpr(&ast.IndexExpr{}); x == NilIndexExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToIndexExpr(nil); x != NilIndexExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToIndexExpr(&ast.Ident{}); x != NilIndexExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToInterfaceType(t *testing.T) {
	// Test successfull cast.
	if x := ToInterfaceType(&ast.InterfaceType{}); x == NilInterfaceType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToInterfaceType(nil); x != NilInterfaceType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToInterfaceType(&ast.Ident{}); x != NilInterfaceType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToKeyValueExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToKeyValueExpr(&ast.KeyValueExpr{}); x == NilKeyValueExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToKeyValueExpr(nil); x != NilKeyValueExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToKeyValueExpr(&ast.Ident{}); x != NilKeyValueExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToMapType(t *testing.T) {
	// Test successfull cast.
	if x := ToMapType(&ast.MapType{}); x == NilMapType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToMapType(nil); x != NilMapType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToMapType(&ast.Ident{}); x != NilMapType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToParenExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToParenExpr(&ast.ParenExpr{}); x == NilParenExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToParenExpr(nil); x != NilParenExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToParenExpr(&ast.Ident{}); x != NilParenExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToSelectorExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToSelectorExpr(&ast.SelectorExpr{}); x == NilSelectorExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToSelectorExpr(nil); x != NilSelectorExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToSelectorExpr(&ast.Ident{}); x != NilSelectorExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToSliceExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToSliceExpr(&ast.SliceExpr{}); x == NilSliceExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToSliceExpr(nil); x != NilSliceExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToSliceExpr(&ast.Ident{}); x != NilSliceExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToStarExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToStarExpr(&ast.StarExpr{}); x == NilStarExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToStarExpr(nil); x != NilStarExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToStarExpr(&ast.Ident{}); x != NilStarExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToStructType(t *testing.T) {
	// Test successfull cast.
	if x := ToStructType(&ast.StructType{}); x == NilStructType || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToStructType(nil); x != NilStructType {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToStructType(&ast.Ident{}); x != NilStructType || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToTypeAssertExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToTypeAssertExpr(&ast.TypeAssertExpr{}); x == NilTypeAssertExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToTypeAssertExpr(nil); x != NilTypeAssertExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToTypeAssertExpr(&ast.Ident{}); x != NilTypeAssertExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToUnaryExpr(t *testing.T) {
	// Test successfull cast.
	if x := ToUnaryExpr(&ast.UnaryExpr{}); x == NilUnaryExpr || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToUnaryExpr(nil); x != NilUnaryExpr {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToUnaryExpr(&ast.Ident{}); x != NilUnaryExpr || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToAssignStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToAssignStmt(&ast.AssignStmt{}); x == NilAssignStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToAssignStmt(nil); x != NilAssignStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToAssignStmt(&ast.Ident{}); x != NilAssignStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBadStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToBadStmt(&ast.BadStmt{}); x == NilBadStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBadStmt(nil); x != NilBadStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBadStmt(&ast.Ident{}); x != NilBadStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBlockStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToBlockStmt(&ast.BlockStmt{}); x == NilBlockStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBlockStmt(nil); x != NilBlockStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBlockStmt(&ast.Ident{}); x != NilBlockStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToBranchStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToBranchStmt(&ast.BranchStmt{}); x == NilBranchStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToBranchStmt(nil); x != NilBranchStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToBranchStmt(&ast.Ident{}); x != NilBranchStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToCaseClause(t *testing.T) {
	// Test successfull cast.
	if x := ToCaseClause(&ast.CaseClause{}); x == NilCaseClause || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToCaseClause(nil); x != NilCaseClause {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToCaseClause(&ast.Ident{}); x != NilCaseClause || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToCommClause(t *testing.T) {
	// Test successfull cast.
	if x := ToCommClause(&ast.CommClause{}); x == NilCommClause || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToCommClause(nil); x != NilCommClause {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToCommClause(&ast.Ident{}); x != NilCommClause || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToDeclStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToDeclStmt(&ast.DeclStmt{}); x == NilDeclStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToDeclStmt(nil); x != NilDeclStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToDeclStmt(&ast.Ident{}); x != NilDeclStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToDeferStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToDeferStmt(&ast.DeferStmt{}); x == NilDeferStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToDeferStmt(nil); x != NilDeferStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToDeferStmt(&ast.Ident{}); x != NilDeferStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToEmptyStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToEmptyStmt(&ast.EmptyStmt{}); x == NilEmptyStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToEmptyStmt(nil); x != NilEmptyStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToEmptyStmt(&ast.Ident{}); x != NilEmptyStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToExprStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToExprStmt(&ast.ExprStmt{}); x == NilExprStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToExprStmt(nil); x != NilExprStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToExprStmt(&ast.Ident{}); x != NilExprStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToForStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToForStmt(&ast.ForStmt{}); x == NilForStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToForStmt(nil); x != NilForStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToForStmt(&ast.Ident{}); x != NilForStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToGoStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToGoStmt(&ast.GoStmt{}); x == NilGoStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToGoStmt(nil); x != NilGoStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToGoStmt(&ast.Ident{}); x != NilGoStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToIfStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToIfStmt(&ast.IfStmt{}); x == NilIfStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToIfStmt(nil); x != NilIfStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToIfStmt(&ast.Ident{}); x != NilIfStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToIncDecStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToIncDecStmt(&ast.IncDecStmt{}); x == NilIncDecStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToIncDecStmt(nil); x != NilIncDecStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToIncDecStmt(&ast.Ident{}); x != NilIncDecStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToLabeledStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToLabeledStmt(&ast.LabeledStmt{}); x == NilLabeledStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToLabeledStmt(nil); x != NilLabeledStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToLabeledStmt(&ast.Ident{}); x != NilLabeledStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToRangeStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToRangeStmt(&ast.RangeStmt{}); x == NilRangeStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToRangeStmt(nil); x != NilRangeStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToRangeStmt(&ast.Ident{}); x != NilRangeStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToReturnStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToReturnStmt(&ast.ReturnStmt{}); x == NilReturnStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToReturnStmt(nil); x != NilReturnStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToReturnStmt(&ast.Ident{}); x != NilReturnStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToSelectStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToSelectStmt(&ast.SelectStmt{}); x == NilSelectStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToSelectStmt(nil); x != NilSelectStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToSelectStmt(&ast.Ident{}); x != NilSelectStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToSendStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToSendStmt(&ast.SendStmt{}); x == NilSendStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToSendStmt(nil); x != NilSendStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToSendStmt(&ast.Ident{}); x != NilSendStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToSwitchStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToSwitchStmt(&ast.SwitchStmt{}); x == NilSwitchStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToSwitchStmt(nil); x != NilSwitchStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToSwitchStmt(&ast.Ident{}); x != NilSwitchStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToTypeSwitchStmt(t *testing.T) {
	// Test successfull cast.
	if x := ToTypeSwitchStmt(&ast.TypeSwitchStmt{}); x == NilTypeSwitchStmt || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToTypeSwitchStmt(nil); x != NilTypeSwitchStmt {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToTypeSwitchStmt(&ast.Ident{}); x != NilTypeSwitchStmt || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToComment(t *testing.T) {
	// Test successfull cast.
	if x := ToComment(&ast.Comment{}); x == NilComment || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToComment(nil); x != NilComment {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToComment(&ast.Ident{}); x != NilComment || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToCommentGroup(t *testing.T) {
	// Test successfull cast.
	if x := ToCommentGroup(&ast.CommentGroup{}); x == NilCommentGroup || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToCommentGroup(nil); x != NilCommentGroup {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToCommentGroup(&ast.Ident{}); x != NilCommentGroup || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToFieldList(t *testing.T) {
	// Test successfull cast.
	if x := ToFieldList(&ast.FieldList{}); x == NilFieldList || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToFieldList(nil); x != NilFieldList {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToFieldList(&ast.Ident{}); x != NilFieldList || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToFile(t *testing.T) {
	// Test successfull cast.
	if x := ToFile(&ast.File{}); x == NilFile || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToFile(nil); x != NilFile {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToFile(&ast.Ident{}); x != NilFile || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}

func TestToPackage(t *testing.T) {
	// Test successfull cast.
	if x := ToPackage(&ast.Package{}); x == NilPackage || x == nil {
		t.Error("expected successfull cast, got nil")
	}
	// Test nil cast.
	if x := ToPackage(nil); x != NilPackage {
		t.Error("nil node didn't resulted in a sentinel value return")
	}
	// Test unsuccessfull cast.
	if x := ToPackage(&ast.Ident{}); x != NilPackage || x == nil {
		t.Errorf("expected unsuccessfull cast to return nil sentinel")
	}
}
