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
- func Group(title string)
- func IsSameErrorType(err1, err2 error) bool
- func SubTitle(title string)
- func Title(title string)
- func Verbose(format string, args ...any)
- type Color
- type UnitTestFramer
- func (u *UnitTestFramer) AsMultiple() *UnitTestFramer
- func (u *UnitTestFramer) Clear()
- func (u *UnitTestFramer) Cry(format string, v ...any) error
- func (u *UnitTestFramer) CryE(expected, got error) error
- func (u *UnitTestFramer) CryV(expected, got any, format string, v ...any) error
- func (u *UnitTestFramer) Outcome()
- func (u *UnitTestFramer) TestCaseFrame(tb testing.TB) func(tb testing.TB)
- func (u *UnitTestFramer) Title(title string) *UnitTestFramer
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 IsSameErrorType ¶
compares error types, the 1st must NOT be nil
Types ¶
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) 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
Click to show internal directories.
Click to hide internal directories.