testIterator

package
v0.0.0-...-90d9f73 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FloatSet = []FloatSample{
	{-math.MaxFloat64, false, false, true, true},
	{-math.MaxFloat64 + 1.1, false, false, true, true},
	{-math.MaxFloat64/2 + .2, false, false, true, true},
	{-(math.MaxFloat64 / 2) + 1.3, false, false, true, true},
	{-3.4, false, false, true, true},
	{-2.5, false, false, true, true},
	{-1.6, false, false, true, true},
	{0, false, true, false, true},
	{1.7, true, true, false, false},
	{2.8, true, true, false, false},
	{3.9, true, true, false, false},
	{4, true, true, false, false},
	{(math.MaxFloat64 / 2) - 1.1, true, true, false, false},
	{math.MaxFloat64/2 + .2, true, true, false, false},
	{math.MaxFloat64 - 1.3, true, true, false, false},
	{math.MaxFloat64, true, true, false, false},
}

FloatSet is a sample set for floating-point numbers. Notice we inject some decimal points, not just integer-equivalents

View Source
var IntSet = []IntSample{
	{-10, false, false, true, true},
	{-5, false, false, true, true},
	{-3, false, false, true, true},
	{-2, false, false, true, true},
	{-1, false, false, true, true},
	{0, false, true, false, true},
	{1, true, true, false, false},
	{2, true, true, false, false},
	{3, true, true, false, false},
	{5, true, true, false, false},
	{10, true, true, false, false},
}

IntSet is a sample-set for ... small positive counters!

View Source
var StringSet = []StringSample{
	{nil, false},
	{ptr(""), true},
	{ptr("non-empty in ascii"), true},
	{ptr("Kanji in unicode (漢字)"), true},
}

StringSet is a sample-set for string pointers, but not pathnames. See also TestPaths.md

Functions

func AllTrue

func AllTrue(b ...bool) bool

AllTrue looks for any false values in a vector of booleans typically used like testIterator.AllTrue(this.Valid, that.Valid, etc)

Types

type FloatSample

type FloatSample struct {
	Value       float64
	Positive    bool
	NonNegative bool
	Negative    bool
	NonPositive bool
}

FloatSample is returned by float64 value generators.

type IntSample

type IntSample struct {
	Value       int
	Positive    bool
	NonNegative bool
	Negative    bool
	NonPositive bool
}

IntSample is returned by int value generators

type StringSample

type StringSample struct {
	Value *string
	Valid bool
}

StringSample is returned by string (not pathname!) value generators

Jump to

Keyboard shortcuts

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