a3d46d52a8
test / release-check (push) Has been skipped
test / 1.25/macos-14 (push) Has been cancelled
test / 1.25/macos-latest (push) Has been cancelled
test / 1.25/ubuntu-latest (push) Has been cancelled
test / 1.25/windows-latest (push) Has been cancelled
test / 1.26/macos-14 (push) Has been cancelled
test / 1.26/macos-latest (push) Has been cancelled
test / 1.26/ubuntu-latest (push) Has been cancelled
test / 1.26/windows-latest (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
22 lines
554 B
Go
22 lines
554 B
Go
package tracker
|
|
|
|
import (
|
|
"reflect"
|
|
"testing"
|
|
|
|
"git.ostiwe.com/ostiwe/go-toml/v2/internal/assert"
|
|
)
|
|
|
|
func TestEntrySize(t *testing.T) {
|
|
// Validate no regression on the size of entry{}. This is a critical bit for
|
|
// performance of unmarshaling documents. Should only be increased with care
|
|
// and a very good reason.
|
|
maxExpectedEntrySize := 48
|
|
entrySize := int(reflect.TypeOf(entry{}).Size())
|
|
assert.True(t,
|
|
entrySize <= maxExpectedEntrySize,
|
|
"Expected entry to be less than or equal to %d, got: %d",
|
|
maxExpectedEntrySize, entrySize,
|
|
)
|
|
}
|