tst

package
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, passed bool, fmtStr string, a ...any) bool

--------------------------------------

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 AssertFalse

func AssertFalse(t *testing.T, val bool, fmtStr string, a ...any) (passed bool)

func AssertSliceEq

func AssertSliceEq[Type comparable](t *testing.T, exp, act []Type, msg string,
) (passed bool)

func AssertTrue

func AssertTrue(t *testing.T, val bool, fmtStr string, a ...any) (passed bool)

func HeaderToStr

func HeaderToStr(hdr *heap.Header, checkSumToo bool) string

---------------------------

func ScanModeToStr

func ScanModeToStr(mode heap.ScanModeTp) string

-------------------

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)

type Vec2

type Vec2 struct{ X, Y uint32 }

------------------

func Vec2ToHeap

func Vec2ToHeap(alc *heap.Allocator, v *Vec2) (*Vec2, error)

type Vec4

type Vec4 struct{ X, Y, Z, W uint32 }

func Vec4ToHeap

func Vec4ToHeap(alc *heap.Allocator, v *Vec4) (*Vec4, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL