Documentation
¶
Overview ¶
Package testdeep allows extremely flexible deep comparison. It is built for testing.
It is a go rewrite and adaptation of wonderful Test::Deep perl module.
In golang, comparing data structure is usually done using reflect.DeepEqual or using a package that uses this function behind the scene.
This function works very well, but it is not flexible. Both compared structures must match exactly.
The purpose of go-testdeep is to do its best to introduce this missing flexibility using "operators" when the expected value (or one of its component) cannot be matched exactly.
testdeep package should not be used in new code, even if it can for backward compatibility reasons, but td package.
All variables and types of testdeep package are aliases to respectively functions and types of td package. They are only here for compatibility purpose as
import "github.com/maxatome/go-testdeep/td"
should now be used, in preference of older, but still supported:
import td "github.com/maxatome/go-testdeep"
For easy HTTP API testing, see tdhttp package.
For tests suites also just as easy, see tdsuite package.
Index ¶
Constants ¶
const BoundsInIn = td.BoundsInIn
BoundsInIn is a deprecated alias of td.BoundsInIn.
const BoundsInOut = td.BoundsInOut
BoundsInOut is a deprecated alias of td.BoundsInOut.
const BoundsOutIn = td.BoundsOutIn
BoundsOutIn is a deprecated alias of td.BoundsOutIn.
const BoundsOutOut = td.BoundsOutOut
BoundsOutOut is a deprecated alias of td.BoundsOutOut.
Variables ¶
var AddAnchorableStructType = td.AddAnchorableStructType
AddAnchorableStructType is a deprecated alias of td.AddAnchorableStructType.
var All = td.All
All is a deprecated alias of td.All.
var Any = td.Any
Any is a deprecated alias of td.Any.
var Array = td.Array
Array is a deprecated alias of td.Array.
var ArrayEach = td.ArrayEach
ArrayEach is a deprecated alias of td.ArrayEach.
var Assert = td.Assert
Assert is a deprecated alias of td.Assert.
var AssertRequire = td.AssertRequire
AssertRequire is a deprecated alias of td.AssertRequire.
var Bag = td.Bag
Bag is a deprecated alias of td.Bag.
var Between = td.Between
Between is a deprecated alias of td.Between.
var Cap = td.Cap
Cap is a deprecated alias of td.Cap.
var Catch = td.Catch
Catch is a deprecated alias of td.Catch.
var Cmp = td.Cmp
Cmp is a deprecated alias of td.Cmp.
var CmpAll = td.CmpAll
CmpAll is a deprecated alias of td.CmpAll.
var CmpAny = td.CmpAny
CmpAny is a deprecated alias of td.CmpAny.
var CmpArray = td.CmpArray
CmpArray is a deprecated alias of td.CmpArray.
var CmpArrayEach = td.CmpArrayEach
CmpArrayEach is a deprecated alias of td.CmpArrayEach.
var CmpBag = td.CmpBag
CmpBag is a deprecated alias of td.CmpBag.
var CmpBetween = td.CmpBetween
CmpBetween is a deprecated alias of td.CmpBetween.
var CmpCap = td.CmpCap
CmpCap is a deprecated alias of td.CmpCap.
var CmpCode = td.CmpCode
CmpCode is a deprecated alias of td.CmpCode.
var CmpContains = td.CmpContains
CmpContains is a deprecated alias of td.CmpContains.
var CmpContainsKey = td.CmpContainsKey
CmpContainsKey is a deprecated alias of td.CmpContainsKey.
var CmpDeeply = td.CmpDeeply
CmpDeeply is a deprecated alias of td.CmpDeeply.
var CmpEmpty = td.CmpEmpty
CmpEmpty is a deprecated alias of td.CmpEmpty.
var CmpError = td.CmpError
CmpError is a deprecated alias of td.CmpError.
var CmpFalse = td.CmpFalse
CmpFalse is a deprecated alias of td.CmpFalse.
var CmpGt = td.CmpGt
CmpGt is a deprecated alias of td.CmpGt.
var CmpGte = td.CmpGte
CmpGte is a deprecated alias of td.CmpGte.
var CmpHasPrefix = td.CmpHasPrefix
CmpHasPrefix is a deprecated alias of td.CmpHasPrefix.
var CmpHasSuffix = td.CmpHasSuffix
CmpHasSuffix is a deprecated alias of td.CmpHasSuffix.
var CmpIsa = td.CmpIsa
CmpIsa is a deprecated alias of td.CmpIsa.
var CmpJSON = td.CmpJSON
CmpJSON is a deprecated alias of td.CmpJSON.
var CmpKeys = td.CmpKeys
CmpKeys is a deprecated alias of td.CmpKeys.
var CmpLax = td.CmpLax
CmpLax is a deprecated alias of td.CmpLax.
var CmpLen = td.CmpLen
CmpLen is a deprecated alias of td.CmpLen.
var CmpLt = td.CmpLt
CmpLt is a deprecated alias of td.CmpLt.
var CmpLte = td.CmpLte
CmpLte is a deprecated alias of td.CmpLte.
var CmpMap = td.CmpMap
CmpMap is a deprecated alias of td.CmpMap.
var CmpMapEach = td.CmpMapEach
CmpMapEach is a deprecated alias of td.CmpMapEach.
var CmpN = td.CmpN
CmpN is a deprecated alias of td.CmpN.
var CmpNaN = td.CmpNaN
CmpNaN is a deprecated alias of td.CmpNaN.
var CmpNil = td.CmpNil
CmpNil is a deprecated alias of td.CmpNil.
var CmpNoError = td.CmpNoError
CmpNoError is a deprecated alias of td.CmpNoError.
var CmpNone = td.CmpNone
CmpNone is a deprecated alias of td.CmpNone.
var CmpNot = td.CmpNot
CmpNot is a deprecated alias of td.CmpNot.
var CmpNotAny = td.CmpNotAny
CmpNotAny is a deprecated alias of td.CmpNotAny.
var CmpNotEmpty = td.CmpNotEmpty
CmpNotEmpty is a deprecated alias of td.CmpNotEmpty.
var CmpNotNaN = td.CmpNotNaN
CmpNotNaN is a deprecated alias of td.CmpNotNaN.
var CmpNotNil = td.CmpNotNil
CmpNotNil is a deprecated alias of td.CmpNotNil.
var CmpNotPanic = td.CmpNotPanic
CmpNotPanic is a deprecated alias of td.CmpNotPanic.
var CmpNotZero = td.CmpNotZero
CmpNotZero is a deprecated alias of td.CmpNotZero.
var CmpPPtr = td.CmpPPtr
CmpPPtr is a deprecated alias of td.CmpPPtr.
var CmpPanic = td.CmpPanic
CmpPanic is a deprecated alias of td.CmpPanic.
var CmpPtr = td.CmpPtr
CmpPtr is a deprecated alias of td.CmpPtr.
var CmpRe = td.CmpRe
CmpRe is a deprecated alias of td.CmpRe.
var CmpReAll = td.CmpReAll
CmpReAll is a deprecated alias of td.CmpReAll.
var CmpSStruct = td.CmpSStruct
CmpSStruct is a deprecated alias of td.CmpSStruct.
var CmpSet = td.CmpSet
CmpSet is a deprecated alias of td.CmpSet.
var CmpShallow = td.CmpShallow
CmpShallow is a deprecated alias of td.CmpShallow.
var CmpSlice = td.CmpSlice
CmpSlice is a deprecated alias of td.CmpSlice.
var CmpSmuggle = td.CmpSmuggle
CmpSmuggle is a deprecated alias of td.CmpSmuggle.
var CmpString = td.CmpString
CmpString is a deprecated alias of td.CmpString.
var CmpStruct = td.CmpStruct
CmpStruct is a deprecated alias of td.CmpStruct.
var CmpSubBagOf = td.CmpSubBagOf
CmpSubBagOf is a deprecated alias of td.CmpSubBagOf.
var CmpSubJSONOf = td.CmpSubJSONOf
CmpSubJSONOf is a deprecated alias of td.CmpSubJSONOf.
var CmpSubMapOf = td.CmpSubMapOf
CmpSubMapOf is a deprecated alias of td.CmpSubMapOf.
var CmpSubSetOf = td.CmpSubSetOf
CmpSubSetOf is a deprecated alias of td.CmpSubSetOf.
var CmpSuperBagOf = td.CmpSuperBagOf
CmpSuperBagOf is a deprecated alias of td.CmpSuperBagOf.
var CmpSuperJSONOf = td.CmpSuperJSONOf
CmpSuperJSONOf is a deprecated alias of td.CmpSuperJSONOf.
var CmpSuperMapOf = td.CmpSuperMapOf
CmpSuperMapOf is a deprecated alias of td.CmpSuperMapOf.
var CmpSuperSetOf = td.CmpSuperSetOf
CmpSuperSetOf is a deprecated alias of td.CmpSuperSetOf.
var CmpTrue = td.CmpTrue
CmpTrue is a deprecated alias of td.CmpTrue.
var CmpTruncTime = td.CmpTruncTime
CmpTruncTime is a deprecated alias of td.CmpTruncTime.
var CmpValues = td.CmpValues
CmpValues is a deprecated alias of td.CmpValues.
var CmpZero = td.CmpZero
CmpZero is a deprecated alias of td.CmpZero.
var Code = td.Code
Code is a deprecated alias of td.Code.
var Contains = td.Contains
Contains is a deprecated alias of td.Contains.
var ContainsKey = td.ContainsKey
ContainsKey is a deprecated alias of td.ContainsKey.
var Delay = td.Delay
Delay is a deprecated alias of td.ContainsKey.
var Empty = td.Empty
Empty is a deprecated alias of td.Empty.
var EqDeeply = td.EqDeeply
EqDeeply is a deprecated alias of td.EqDeeply.
var EqDeeplyError = td.EqDeeplyError
EqDeeplyError is a deprecated alias of td.EqDeeplyError.
var Gt = td.Gt
Gt is a deprecated alias of td.Gt.
var Gte = td.Gte
Gte is a deprecated alias of td.Gte.
var HasPrefix = td.HasPrefix
HasPrefix is a deprecated alias of td.HasPrefix.
var HasSuffix = td.HasSuffix
HasSuffix is a deprecated alias of td.HasSuffix.
var Ignore = td.Ignore
Ignore is a deprecated alias of td.Ignore.
var Isa = td.Isa
Isa is a deprecated alias of td.Isa.
var JSON = td.JSON
JSON is a deprecated alias of td.JSON.
var Keys = td.Keys
Keys is a deprecated alias of td.Keys.
var Lax = td.Lax
Lax is a deprecated alias of td.Lax.
var Len = td.Len
Len is a deprecated alias of td.Len.
var Lt = td.Lt
Lt is a deprecated alias of td.Lt.
var Lte = td.Lte
Lte is a deprecated alias of td.Lte.
var Map = td.Map
Map is a deprecated alias of td.Map.
var MapEach = td.MapEach
MapEach is a deprecated alias of td.MapEach.
var N = td.N
N is a deprecated alias of td.N.
var NaN = td.NaN
NaN is a deprecated alias of td.NaN.
var NewT = td.NewT
NewT is a deprecated alias of td.NewT.
var Nil = td.Nil
Nil is a deprecated alias of td.Nil.
var None = td.None
None is a deprecated alias of td.None.
var Not = td.Not
Not is a deprecated alias of td.Not.
var NotAny = td.NotAny
NotAny is a deprecated alias of td.NotAny.
var NotEmpty = td.NotEmpty
NotEmpty is a deprecated alias of td.NotEmpty.
var NotNaN = td.NotNaN
NotNaN is a deprecated alias of td.NotNaN.
var NotNil = td.NotNil
NotNil is a deprecated alias of td.NotNil.
var NotZero = td.NotZero
NotZero is a deprecated alias of td.NotZero.
var PPtr = td.PPtr
PPtr is a deprecated alias of td.PPtr.
var Ptr = td.Ptr
Ptr is a deprecated alias of td.Ptr.
var Re = td.Re
Re is a deprecated alias of td.Re.
var ReAll = td.ReAll
ReAll is a deprecated alias of td.ReAll.
var Require = td.Require
Require is a deprecated alias of td.Require.
var SStruct = td.SStruct
SStruct is a deprecated alias of td.SStruct.
var Set = td.Set
Set is a deprecated alias of td.Set.
var Shallow = td.Shallow
Shallow is a deprecated alias of td.Shallow.
var Slice = td.Slice
Slice is a deprecated alias of td.Slice.
var Smuggle = td.Smuggle
Smuggle is a deprecated alias of td.Smuggle.
var String = td.String
String is a deprecated alias of td.String.
var Struct = td.Struct
Struct is a deprecated alias of td.Struct.
var SubBagOf = td.SubBagOf
SubBagOf is a deprecated alias of td.SubBagOf.
var SubJSONOf = td.SubJSONOf
SubJSONOf is a deprecated alias of td.SubJSONOf.
var SubMapOf = td.SubMapOf
SubMapOf is a deprecated alias of td.SubMapOf.
var SubSetOf = td.SubSetOf
SubSetOf is a deprecated alias of td.SubSetOf.
var SuperBagOf = td.SuperBagOf
SuperBagOf is a deprecated alias of td.SuperBagOf.
var SuperJSONOf = td.SuperJSONOf
SuperJSONOf is a deprecated alias of td.SuperJSONOf.
var SuperMapOf = td.SuperMapOf
SuperMapOf is a deprecated alias of td.SuperMapOf.
var SuperSetOf = td.SuperSetOf
SuperSetOf is a deprecated alias of td.SuperSetOf.
var Tag = td.Tag
Tag is a deprecated alias of td.Tag.
var TruncTime = td.TruncTime
TruncTime is a deprecated alias of td.TruncTime.
var Values = td.Values
Values is a deprecated alias of td.Values.
var Zero = td.Zero
Zero is a deprecated alias of td.Zero.
Functions ¶
This section is empty.
Types ¶
type ArrayEntries ¶
type ArrayEntries = td.ArrayEntries
ArrayEntries is a deprecated alias of td.ArrayEntries.
type BoundsKind ¶
type BoundsKind = td.BoundsKind
BoundsKind is a deprecated alias of td.BoundsKind.
type ContextConfig ¶
type ContextConfig = td.ContextConfig
ContextConfig is a deprecated alias of td.ContextConfig.
type MapEntries ¶
type MapEntries = td.MapEntries
MapEntries is a deprecated alias of td.MapEntries.
type SmuggledGot ¶
type SmuggledGot = td.SmuggledGot
SmuggledGot is a deprecated alias of td.SmuggledGot.
type StructFields ¶
type StructFields = td.StructFields
StructFields is a deprecated alias of td.StructFields.
type TestingFT ¶
TestingFT is a deprecated alias of td.TestingFT, which is itself a deprecated alias of testing.TB.
Directories
¶
Path | Synopsis |
---|---|
helpers
|
|
nocolor
Package nocolor is only intended to easily disable coloring output of failure reports, typically useful in golang playground.
|
Package nocolor is only intended to easily disable coloring output of failure reports, typically useful in golang playground. |
tdhttp
Package tdhttp, from [go-testdeep], provides some functions to easily test HTTP handlers.
|
Package tdhttp, from [go-testdeep], provides some functions to easily test HTTP handlers. |
tdsuite
Package tdsuite adds tests suite feature to [go-testdeep] in a non-intrusive way, but easily and powerfully.
|
Package tdsuite adds tests suite feature to [go-testdeep] in a non-intrusive way, but easily and powerfully. |
tdutil
Package tdutil allows to write unit tests for go-testdeep helpers and so provides some helpful functions.
|
Package tdutil allows to write unit tests for go-testdeep helpers and so provides some helpful functions. |
internal
|
|
Package td (from [go-testdeep]) allows extremely flexible deep comparison, it is built for testing.
|
Package td (from [go-testdeep]) allows extremely flexible deep comparison, it is built for testing. |