https://github.com/alexpantyukhin/assertord
https://github.com/alexpantyukhin/assertord
arrays go golang test testing unittest
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/alexpantyukhin/assertord
- Owner: alexpantyukhin
- Created: 2018-12-26T15:17:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T20:22:43.000Z (over 7 years ago)
- Last Synced: 2025-03-21T08:11:42.303Z (over 1 year ago)
- Topics: arrays, go, golang, test, testing, unittest
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Go asserts for checking collections order.
[](https://travis-ci.org/alexpantyukhin/assertord)
[](https://godoc.org/github.com/alexpantyukhin/assertord)
The lib contains a list of functions for checking ordering of slices and arrays.
The following checks are implemented:
- IsOrdered
- IsNotOrdered
- IsOrderedAsc
- IsNotOrderedAsc
- IsOrderedDesc
- IsNotOrderedDesc
# Usage example
```go
package main
import (
"testing"
"github.com/alexpantyukhin/assertord"
)
func TestIsOrdered(t *testing.T) {
arr := []int{1, 2, 3, 4}
assertord.IsOrdered(t, arr)
}
```