...

Source file src/github.com/pelletier/go-toml/v2/internal/tracker/seen_test.go

Documentation: github.com/pelletier/go-toml/v2/internal/tracker

     1  package tracker
     2  
     3  import (
     4  	"testing"
     5  	"unsafe"
     6  
     7  	"github.com/stretchr/testify/require"
     8  )
     9  
    10  func TestEntrySize(t *testing.T) {
    11  	// Validate no regression on the size of entry{}. This is a critical bit for
    12  	// performance of unmarshaling documents. Should only be increased with care
    13  	// and a very good reason.
    14  	maxExpectedEntrySize := 48
    15  	require.LessOrEqual(t, int(unsafe.Sizeof(entry{})), maxExpectedEntrySize)
    16  }
    17  

View as plain text