assert

package
v0.0.2-0...-db6250e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: CC0-1.0, CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assertions

type Assertions struct {
	*assert.Assertions
}

Assertions embeds the Assertions struct from github.com/stretchr/testify/assert.

func New

func New(t assert.TestingT) (a *Assertions)

New returns a new *Assertions for the given testing context t.

func (*Assertions) AddIsEqualTo

func (a *Assertions) AddIsEqualTo(R abeliangroup.Interface, x object.Element, y object.Element, z object.Element, msgAndArgs ...interface{}) bool

AddIsEqualTo asserts that R.AreEqual(R.Add(x,y),z) returns true.

func (*Assertions) AreEqual

func (a *Assertions) AreEqual(R object.Parent, x object.Element, y object.Element, msgAndArgs ...interface{}) bool

AreEqual asserts that R.AreEqual(x,y) returns true.

func (*Assertions) AreEqualSlices

func (a *Assertions) AreEqualSlices(R object.Parent, S1 interface{}, S2 interface{}, msgAndArgs ...interface{}) bool

AreEqualSlices asserts that len(S1) = len(S2) and that R.AreEqual(S1[i],S2[i]) return true for all i.

func (*Assertions) AreNotEqual

func (a *Assertions) AreNotEqual(R object.Parent, x object.Element, y object.Element, msgAndArgs ...interface{}) bool

AreNotEqual asserts that R.AreEqual(x,y) returns false (but not an error).

func (*Assertions) Cmp

func (a *Assertions) Cmp(R compare.Cmper, x object.Element, y object.Element, sgn int, msgAndArgs ...interface{}) bool

Cmp asserts that R.Cmp(x,y) == sgn.

func (*Assertions) Contains

func (a *Assertions) Contains(R object.Parent, x object.Element, msgAndArgs ...interface{}) bool

Contains asserts that R.Contains(x) returns true.

func (*Assertions) IsEqualToInt

func (a *Assertions) IsEqualToInt(x *integer.Element, y int, msgAndArgs ...interface{}) bool

IsEqualToInt asserts that the given *integer.Element is equal to the given int.

func (*Assertions) IsEqualToInt64

func (a *Assertions) IsEqualToInt64(x *integer.Element, y int64, msgAndArgs ...interface{}) bool

IsEqualToInt64 asserts that the given *integer.Element is equal to the given int64.

func (*Assertions) IsOne

func (a *Assertions) IsOne(x IsOner, msgAndArgs ...interface{}) bool

IsOne asserts that x.IsOne() returns true.

func (*Assertions) IsOneIn

func (a *Assertions) IsOneIn(R ring.Interface, x object.Element, msgAndArgs ...interface{}) bool

IsOneIn asserts that R.IsOne(x) returns true.

func (*Assertions) IsZero

func (a *Assertions) IsZero(x IsZeroer, msgAndArgs ...interface{}) bool

IsZero asserts that x.IsZero() returns true.

func (*Assertions) IsZeroIn

func (a *Assertions) IsZeroIn(R abeliangroup.Interface, x object.Element, msgAndArgs ...interface{}) bool

IsZeroIn asserts that R.IsZero(x) returns true.

func (*Assertions) MultiplyIsEqualTo

func (a *Assertions) MultiplyIsEqualTo(R ring.Interface, x object.Element, y object.Element, z object.Element, msgAndArgs ...interface{}) bool

MultiplyIsEqualTo asserts that R.AreEqual(R.Multiply(x,y),z) returns true.

func (*Assertions) NegateIsEqualTo

func (a *Assertions) NegateIsEqualTo(R abeliangroup.Interface, x object.Element, y object.Element, msgAndArgs ...interface{}) bool

NegateIsEqualTo asserts that R.AreEqual(R.Negate(x),y) returns true.

func (*Assertions) NotContains

func (a *Assertions) NotContains(R object.Parent, x object.Element, msgAndArgs ...interface{}) bool

NotContains asserts that R.Contains(x) returns false.

func (*Assertions) PowerIsEqualTo

func (a *Assertions) PowerIsEqualTo(R ring.Interface, x object.Element, k *integer.Element, y object.Element, msgAndArgs ...interface{}) bool

PowerIsEqualTo asserts that R.AreEqual(R.Power(x,k),y) returns true.

func (*Assertions) Printf

func (a *Assertions) Printf(format string, x ...interface{}) (n int, err error)

Printf is a copy of fmt.Printf, for easier debug-printing

func (*Assertions) ScalarMultiplyByIntegerIsEqualTo

func (a *Assertions) ScalarMultiplyByIntegerIsEqualTo(R abeliangroup.Interface, c *integer.Element, x object.Element, y object.Element, msgAndArgs ...interface{}) bool

ScalarMultiplyByIntegerIsEqualTo asserts that R.AreEqual(R.ScalarMultiplyByInteger(c,x),y) returns true.

func (*Assertions) SubtractIsEqualTo

func (a *Assertions) SubtractIsEqualTo(R abeliangroup.Interface, x object.Element, y object.Element, z object.Element, msgAndArgs ...interface{}) bool

SubtractIsEqualTo asserts that R.AreEqual(R.Subtract(x,y),z) returns true.

type IsOner

type IsOner interface {
	object.Element
	IsOne() bool // IsOne returns true iff the object is the unit element 1.
}

IsOner is the interface satisfied by an object.Element with the IsOne method.

type IsZeroer

type IsZeroer interface {
	object.Element
	IsZero() bool // IsZero returns true iff the object is the zero element 0.
}

IsZeroer is the interface satisfied by an object.Element with the IsZero method.

Jump to

Keyboard shortcuts

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