Documentation
¶
Index ¶
- func Assert(t *testing.T, passed bool, fmtStr string, a ...any) bool
- func AssertEq[Type comparable](t *testing.T, exp, act Type, fmtStr string, a ...any) (passed bool)
- func AssertFalse(t *testing.T, val bool, fmtStr string, a ...any) (passed bool)
- func AssertSliceEq[Type comparable](t *testing.T, exp, act []Type, msg string) (passed bool)
- func AssertTrue(t *testing.T, val bool, fmtStr string, a ...any) (passed bool)
- func HeaderToStr(hdr *heap.Header, checkSumToo bool) string
- func ScanModeToStr(mode heap.ScanModeTp) string
- func StressCheck(ctx *TestContext)
- type ChunkCounter
- type TestContext
- func (ctx *TestContext) CheckScan(modes ...heap.ScanModeTp)
- func (ctx *TestContext) CheckScanRaw(mode heap.ScanModeTp, expFree, expUsed uint32)
- func (ctx *TestContext) HdrEquals(refUsed bool, refChunkSize uint32, act *heap.Header)
- func (ctx *TestContext) HdrEqualsRaw(ref, act *heap.Header, checkSumToo bool)
- func (ctx *TestContext) TestScan(modes ...heap.ScanModeTp)
- func (ctx *TestContext) Vec2OnHeapEquals(vRef Vec2, v *Vec2)
- func (ctx *TestContext) Vec2ToHeap(v *Vec2) (*Vec2, error)
- func (ctx *TestContext) Vec4ToHeap(v *Vec4) (*Vec4, error)
- type Vec2
- type Vec4
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEq ¶
func AssertEq[Type comparable](t *testing.T, exp, act Type, fmtStr string, a ...any, ) (passed bool)
TODO check usages and use the fmtStr
func AssertSliceEq ¶
func AssertSliceEq[Type comparable](t *testing.T, exp, act []Type, msg string, ) (passed bool)
func HeaderToStr ¶
---------------------------
func StressCheck ¶
func StressCheck(ctx *TestContext)
Types ¶
type ChunkCounter ¶
type ChunkCounter struct {
// contains filtered or unexported fields
}
------------------
func MakeChunkCounter ¶
func MakeChunkCounter() ChunkCounter
func (*ChunkCounter) RegFree ¶
func (this *ChunkCounter) RegFree() *ChunkCounter
func (*ChunkCounter) RegUsed ¶
func (this *ChunkCounter) RegUsed(items uint32) *ChunkCounter
func (*ChunkCounter) Reset ¶
func (this *ChunkCounter) Reset() *ChunkCounter
func (*ChunkCounter) UnregFree ¶
func (this *ChunkCounter) UnregFree() *ChunkCounter
func (*ChunkCounter) UnregUsed ¶
func (this *ChunkCounter) UnregUsed(items uint32) *ChunkCounter
type TestContext ¶
type TestContext struct {
Allocator *heap.Allocator
ChunkCnt ChunkCounter
T *testing.T
}
------------------
func (*TestContext) CheckScan ¶
func (ctx *TestContext) CheckScan(modes ...heap.ScanModeTp)
func (*TestContext) CheckScanRaw ¶
func (ctx *TestContext) CheckScanRaw(mode heap.ScanModeTp, expFree, expUsed uint32)
func (*TestContext) HdrEquals ¶
func (ctx *TestContext) HdrEquals(refUsed bool, refChunkSize uint32, act *heap.Header)
func (*TestContext) HdrEqualsRaw ¶
func (ctx *TestContext) HdrEqualsRaw(ref, act *heap.Header, checkSumToo bool)
func (*TestContext) TestScan ¶
func (ctx *TestContext) TestScan(modes ...heap.ScanModeTp)
func (*TestContext) Vec2OnHeapEquals ¶
func (ctx *TestContext) Vec2OnHeapEquals(vRef Vec2, v *Vec2)
func (*TestContext) Vec2ToHeap ¶
func (ctx *TestContext) Vec2ToHeap(v *Vec2) (*Vec2, error)
func (*TestContext) Vec4ToHeap ¶
func (ctx *TestContext) Vec4ToHeap(v *Vec4) (*Vec4, error)
Click to show internal directories.
Click to hide internal directories.