gdecimal

package module
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 1 Imported by: 0

README

= Gomega Matchers for Decimal
---

image:https://img.shields.io/github/go-mod/go-version/itbasis/gdecimal[GitHub go.mod Go version]
image:https://img.shields.io/badge/godoc-reference-blue.svg[link=https://pkg.go.dev/github.com/itbasis/gdecimal]
image:https://img.shields.io/github/v/release/itbasis/gdecimal[GitHub Release]
https://codecov.io/gh/itbasis/gdecimal[image:https://codecov.io/gh/itbasis/gdecimal/graph/badge.svg?token=7nCfsLsE2e[codecov]]
https://goreportcard.com/report/github.com/itbasis/gdecimal[image:https://goreportcard.com/badge/github.com/itbasis/gdecimal[Go Report Card]]

These package providers are some helpful https://github.com/onsi/gomega[Gomega] matchers that help you write effective assertions against https://github.com/shopspring/decimal[Decimal]

== Matchers
`BeDecimalEquivalentTo`, `BeDecimalGreaterThan`, `BeDecimalGreaterThanOrEqual`, `BeDecimalLessThan`, `BeDecimalLessThanOrEqual`

Matches can accept Decimal and strings for both the actual and the expected value

== Sample

link:matchers_example_test.go[] - Link, since GitHub does not support include for AsciiDoc

[source,go]
----
include::matchers_example_test.go[]
----

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeDecimalEquivalentTo

func BeDecimalEquivalentTo(expect interface{}) *matchers.BeEquivalentToMatcher

func BeDecimalGreaterThan added in v1.0.0

func BeDecimalGreaterThan(expect interface{}) *matchers.BeGreaterThanMatcher

func BeDecimalGreaterThanOrEqual added in v1.0.0

func BeDecimalGreaterThanOrEqual(expect interface{}) *matchers.BeGreaterThanOrEqualMatcher

func BeDecimalLessThan added in v1.0.0

func BeDecimalLessThan(expect interface{}) *matchers.BeLessThanMatcher

func BeDecimalLessThanOrEqual added in v1.0.0

func BeDecimalLessThanOrEqual(expect interface{}) *matchers.BeLessThanOrEqualMatcher

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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