github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/iavl/tree_dotgraph_test.go (about)

     1  package iavl
     2  
     3  import (
     4  	"io/ioutil"
     5  	"testing"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestWriteDOTGraph(t *testing.T) {
    11  	tree, err := getTestTree(0)
    12  	require.NoError(t, err)
    13  	for _, ikey := range []byte{
    14  		0x0a, 0x11, 0x2e, 0x32, 0x50, 0x72, 0x99, 0xa1, 0xe4, 0xf7,
    15  	} {
    16  		key := []byte{ikey}
    17  		tree.Set(key, key)
    18  	}
    19  	WriteDOTGraph(ioutil.Discard, tree.ImmutableTree, []PathToLeaf{})
    20  }