decode: allow subtables to be defined later (#750)

Fixes #739
This commit is contained in:
Thomas Pelletier
2022-04-07 21:49:16 -04:00
committed by GitHub
parent 88a8aecdd4
commit 89d7b412d8
3 changed files with 56 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
package tracker
import (
"testing"
"unsafe"
"github.com/stretchr/testify/require"
)
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.
require.LessOrEqual(t, 48, int(unsafe.Sizeof(entry{})))
}