Skip to content

Commit

Permalink
style: migrate test files
Browse files Browse the repository at this point in the history
Change-Id: I940a24216ac63fc3604333edca0fa09c467b99f7
  • Loading branch information
andeya committed Dec 9, 2022
1 parent 29360cb commit d097ddf
Show file tree
Hide file tree
Showing 109 changed files with 1,973 additions and 2,819 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![GoDoc](https://godoc.org/github.com/andeya/gust?status.svg)](https://pkg.go.dev/github.com/andeya/gust)
![Build Status](https://github.com/andeya/gust/actions/workflows/go.yml/badge.svg)
[![Go report](https://goreportcard.com/badge/github.com/andeya/gust)](https://goreportcard.com/report/github.com/andeya/gust)
[![Coverage](https://img.shields.io/codecov/c/github/samber/do)](https://codecov.io/gh/andeya/gust)
[![Coverage](https://img.shields.io/codecov/c/github/andeya/gust)](https://codecov.io/gh/andeya/gust)
[![License](https://img.shields.io/github/license/andeya/gust)](./LICENSE)

A Rust-inspired **declarative-programming and generic-type module** for Golang that helps avoid bugs and improve development efficiency.
Expand Down
18 changes: 18 additions & 0 deletions enum_result_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,21 @@ func TestEnumResultUnwrapOrThrow_2(t *testing.T) {
defer gust.CatchEnumResult[int, string](&r)
panic("panic text")
}

func TestEnumResult_Err(t *testing.T) {
{
var x = gust.EnumOk[int, string](2)
assert.Equal(t, gust.None[string](), x.Err())
}
{
var x = gust.EnumErr[int, string]("some error message")
assert.Equal(t, gust.Some[string]("some error message"), x.Err())
}
}

func TestEnumResult_IsErrAnd(t *testing.T) {
{
var x = gust.EnumErr[int, int8](-1)
assert.True(t, x.IsErrAnd(func(x int8) bool { return x == -1 }))
}
}
28 changes: 0 additions & 28 deletions examples/iterator/advance_by_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions examples/iterator/all_test.go

This file was deleted.

33 changes: 0 additions & 33 deletions examples/iterator/any_test.go

This file was deleted.

30 changes: 0 additions & 30 deletions examples/iterator/chain_test.go

This file was deleted.

27 changes: 0 additions & 27 deletions examples/iterator/count_test.go

This file was deleted.

23 changes: 0 additions & 23 deletions examples/iterator/enumerate_test.go

This file was deleted.

44 changes: 0 additions & 44 deletions examples/iterator/filter_map_test.go

This file was deleted.

27 changes: 0 additions & 27 deletions examples/iterator/filter_test.go

This file was deleted.

18 changes: 0 additions & 18 deletions examples/iterator/find_map_test.go

This file was deleted.

31 changes: 0 additions & 31 deletions examples/iterator/find_test.go

This file was deleted.

23 changes: 0 additions & 23 deletions examples/iterator/flat_map_test.go

This file was deleted.

17 changes: 0 additions & 17 deletions examples/iterator/flatten_test.go

This file was deleted.

Loading

0 comments on commit d097ddf

Please sign in to comment.