test

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

----------------------------------------------------------------- * L o r d O f S c r i p t s (tm) * Copyright (C)2024 Dídimo Grimaldo T. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Library of Test Utilities *-----------------------------------------------------------------

Index

Constants

View Source
const (
	ColorBlack       Color = "\u001b[30m"
	ColorRed               = "\u001b[31m"
	ColorLightRed          = "\u001b[91m"
	ColorGreen             = "\u001b[32m"
	ColorBrown             = "\u001b[33m"
	ColorYellow            = "\u001b[93m"
	ColorPurple            = "\u001b[35m"
	ColorLightPurple       = "\u001b[95m"
	ColorBlue              = "\u001b[34m"
	ColorMagenta           = "\u001b[35m"
	ColorCyan              = "\u001b[36m"
	SlowBlink              = "\u001b[5m"
	BlinkOff               = "\u001b[25m"
	ColorReset             = "\u001b[0m"
)

Variables

This section is empty.

Functions

func Group

func Group(title string)

func IsSameErrorType

func IsSameErrorType(err1, err2 error) bool

compares error types, the 1st must NOT be nil

func SubTitle

func SubTitle(title string)

func Title

func Title(title string)

func Verbose

func Verbose(format string, args ...any)

Types

type Color

type Color string

type UnitTestFramer

type UnitTestFramer struct {
	// contains filtered or unexported fields
}

func NewUnitTestFramer

func NewUnitTestFramer(testName string, t *testing.T) *UnitTestFramer

func (*UnitTestFramer) AsMultiple

func (u *UnitTestFramer) AsMultiple() *UnitTestFramer

AsMultiple causes the setup title to become indented as a sub-testcase

func (*UnitTestFramer) Clear

func (u *UnitTestFramer) Clear()

Clear resets all the counters so that the instance can be reused in another test (sub)case.

func (*UnitTestFramer) Cry

func (u *UnitTestFramer) Cry(format string, v ...any) error

func (*UnitTestFramer) CryE

func (u *UnitTestFramer) CryE(expected, got error) error

func (*UnitTestFramer) CryV

func (u *UnitTestFramer) CryV(expected, got any, format string, v ...any) error

func (*UnitTestFramer) Outcome

func (u *UnitTestFramer) Outcome()

func (*UnitTestFramer) TestCaseFrame

func (u *UnitTestFramer) TestCaseFrame(tb testing.TB) func(tb testing.TB)

func (*UnitTestFramer) Title

func (u *UnitTestFramer) Title(title string) *UnitTestFramer

Jump to

Keyboard shortcuts

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