grafana/pkg/util/reverse_test.go
Sofia Papagiannaki 5c973e58bd
Nested Folders: Add tests for store methods (#57662)
* Nested Folders: Add store tests

* Fix parent order

* Fix update

* skip tests!

* Export test helpers for now
2022-11-03 14:21:41 +01:00

16 lines
267 B
Go

package util
import (
"testing"
"github.com/google/go-cmp/cmp"
)
func TestReverse(t *testing.T) {
input := []int{1, 2, 3, 4, 5}
if diff := cmp.Diff([]int{5, 4, 3, 2, 1}, Reverse(input)); diff != "" {
t.Errorf("Result mismatch (-want +got):\n%s", diff)
}
}