compare

package
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeepEquals check.Checker = &deepEqualsChecker{
	&check.CheckerInfo{Name: "DeepEquals", Params: []string{"obtained", "expected"}},
}

DeepEquals is a gocheck checker that provides a readable diff in case comparison fails.

View Source
var SortedSliceEquals check.Checker = &sliceEqualsChecker{
	&check.CheckerInfo{Name: "SortedSliceEquals", Params: []string{"obtained", "expected"}},
}

SortedSliceEquals is a gocheck checker that compares two slices after sorting them. It expects the slice parameters to implement sort.Interface

Functions

func DeepCompare

func DeepCompare(c *check.C, a, b interface{})

DeepCompare uses gocheck DeepEquals but provides nice diff if things are not equal

func Diff

func Diff(a, b interface{}) string

Diff returns user friendly difference between two objects

func Sdump

func Sdump(a interface{}) string

Sdump returns debug-friendly text representation of a

Types

This section is empty.

Jump to

Keyboard shortcuts

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