// This is a quick check to keep the core loop allocation-free.
This is a quick check to keep the core loop allocation-free.
// This is a quick check to keep the core loop allocation - free .
func TestNoMallocs(t *testing.T) {
	tcs := []struct {
		valuePtrs bool
		topLevel  bool
	}{
		{false, false},
		{false, true},
		{true, false},
		{true, true},
	}
	for _, tc := range tcs {
		t.Run(fmt.Sprintf("%+v", tc), func(t *testing.T) {
			a := assert.New(t)
			x, _ := demo.NewContainer(tc.valuePtrs)
			testNoMallocs(a, x, tc.topLevel)
		})
	}
}
func TestNoMallocs ( t * testing . T ) { tcs := [ ] struct { valuePtrs bool topLevel bool } { { false , false } , { false , true } , { true , false } , { true , true } , } for _ , tc := range tcs { t . Run ( fmt . Sprintf ( " " , tc ) , func ( t * testing . T ) { a := assert . New ( t ) x , _ := demo . NewContainer ( tc . valuePtrs ) testNoMallocs ( a , x , tc . topLevel ) } ) } }
This is a quick check to keep the core loop allocation-free.
This is a quick check to keep the core loop allocation - free .