Help us shape the future of Go! Take the 2026 Go Developer Survey

stegol

package module
v0.2.3-beta1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

README

STEGoL

License GitHub release Last Commit Go Go Report Card Go Reference

Simple Testing Enhancements for the Go Language

Introduction

T.B.C.

Table of Contents

Installation

import stegol "github.com/synesissoftware/STEGoL"

Components

// CheckStringEqual() evaluates two strings for equality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison.
func CheckStringEqual(t *testing.T, expected, actual string, options any)

// CheckStringNotEqual() evaluates two strings for inequality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison.
func CheckStringNotEqual(t *testing.T, expected, actual string, options any)

// CheckStringEqualChomped() evaluates two strings for equality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison after chomping the actual value.
func CheckStringEqualChomped(t *testing.T, expected, actual string, options any)

// CheckStringNotEqualChomped() evaluates two strings for inequality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison after chomping the actual value.
func CheckStringNotEqualChomped(t *testing.T, expected, actual string, options any)

// CheckStringEqualTrimmed() evaluates two strings for equality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison after whitespace-trimming the actual value.
func CheckStringEqualTrimmed(t *testing.T, expected, actual string, options any)

// CheckStringNotEqualTrimmed() evaluates two strings for inequality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison after whitespace-trimming the actual value.
func CheckStringNotEqualTrimmed(t *testing.T, expected, actual string, options any)

// CheckStringEqualIgnoreCase() evaluates two strings for equality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison ignoring the case of the strings, via the
// strings.EqualFold() standard library function.
func CheckStringEqualIgnoreCase(t *testing.T, expected, actual string, options any)

// CheckStringEqualIgnoreCase() evaluates two strings for inequality, calling
// testing.T.Errorf() if the evaluation fails. The evaluation is done by
// equality comparison ignoring the case of the strings, via the
// strings.EqualFold() standard library function.
func CheckStringNotEqualIgnoreCase(t *testing.T, expected, actual string, options any)

func CheckStringByStringMatch(t *testing.T, pattern string, actual string, options any)

// CheckStringCompare() evaluates two strings, calling testing.T.Errorf()
// if the evaluation fails. The evaluation is done by the given
// caller-supplied comparison function, whose brief descriptor
// comparison_type, e.g. "regular expression" will be prefixed with the
// string "when compared by ".
func CheckStringCompare(t *testing.T, expected, actual string, fn StringCompareFunc, comparison_type string, options any)

// CheckStringEqualAny() evaluates a string for equality against an array of
// string values, calling testing.T.Errorf() if every evaluation fails. Each
// evaluation is done by equality comparison.
func CheckStringEqualAny(t *testing.T, expecteds []string, actual string, options any)

Examples

Examples are provided in the examples directory, along with a markdown description for each. A detailed list TOC of them is provided in EXAMPLES.md.

Project Information

Where to get help

GitHub Page

Contribution guidelines

Defect reports, feature requests, and pull requests are welcome on https://github.com/synesissoftware/STEGoL.

Dependencies
Development/Testing Dependencies

T.B.C.

License

STEGoL is released under the 3-clause BSD license. See LICENSE for details.

Documentation

Index

Constants

View Source
const (
	VersionMajor uint16 = 0
	VersionMinor uint16 = 2
	VersionPatch uint16 = 3
	VersionAB    uint16 = 0x8001
	Version      uint64 = (uint64(VersionMajor) << 48) + (uint64(VersionMinor) << 32) + (uint64(VersionPatch) << 16) + (uint64(VersionAB) << 0)
)
View Source
const (
	CheckStringFlag_None = 1 << iota
)

Variables

This section is empty.

Functions

func CheckStringByStringMatch

func CheckStringByStringMatch(t *testing.T, pattern string, actual string, options ...any)

func CheckStringCompare

func CheckStringCompare(t *testing.T, expected, actual string, fn StringCompareFunc, comparison_type string, options ...any)

CheckStringCompare() evaluates two strings, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by the given caller-supplied comparison function, whose brief descriptor comparison_type, e.g. "regular expression" will be prefixed with the string "when compared by ".

func CheckStringEqual

func CheckStringEqual(t *testing.T, expected, actual string, options ...any)

CheckStringEqual() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison.

func CheckStringEqualAny

func CheckStringEqualAny(t *testing.T, expecteds []string, actual string, options ...any)

CheckStringEqualAny() evaluates a string for equality against an array of string values, calling testing.T.Errorf() if every evaluation fails. Each evaluation is done by equality comparison.

func CheckStringEqualChomped added in v0.2.0

func CheckStringEqualChomped(t *testing.T, expected, actual string, options ...any)

CheckStringEqualChomped() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after chomping the actual value.

func CheckStringEqualIgnoreCase

func CheckStringEqualIgnoreCase(t *testing.T, expected, actual string, options ...any)

CheckStringEqualIgnoreCase() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison ignoring the case of the strings, via the strings.EqualFold() standard library function.

func CheckStringEqualTrimmed

func CheckStringEqualTrimmed(t *testing.T, expected, actual string, options ...any)

CheckStringEqualTrimmed() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after whitespace-trimming the actual value.

func CheckStringNotEqual added in v0.2.0

func CheckStringNotEqual(t *testing.T, expected, actual string, options ...any)

CheckStringNotEqual() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison.

func CheckStringNotEqualChomped added in v0.2.0

func CheckStringNotEqualChomped(t *testing.T, expected, actual string, options ...any)

CheckStringNotEqualChomped() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after chomping the actual value.

func CheckStringNotEqualIgnoreCase added in v0.2.0

func CheckStringNotEqualIgnoreCase(t *testing.T, expected, actual string, options ...any)

CheckStringEqualIgnoreCase() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison ignoring the case of the strings, via the strings.EqualFold() standard library function.

func CheckStringNotEqualTrimmed added in v0.2.0

func CheckStringNotEqualTrimmed(t *testing.T, expected, actual string, options ...any)

CheckStringNotEqualTrimmed() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after whitespace-trimming the actual value.

func VersionString added in v0.2.2

func VersionString() string

Types

type CheckStringFlag

type CheckStringFlag int

type StringCompareFunc

type StringCompareFunc func(expected, actual string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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