Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
adamluzsi committed Jun 3, 2024
1 parent 40e609e commit f80f420
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 28 deletions.
3 changes: 2 additions & 1 deletion assert/AnyOf_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package assert_test

import (
"testing"

"go.llib.dev/testcase/random"
"go.llib.dev/testcase/sandbox"
"testing"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
Expand Down
2 changes: 1 addition & 1 deletion assert/Eventually.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func (fn RetryStrategyFunc) While(condition func() bool) { fn(condition) }
// In case expectations are failed, it will retry the assertion block using the RetryStrategy.
// The last failed assertion results would be published to the received testing.TB.
// Calling multiple times the assertion function block content should be a safe and repeatable operation.
func (r Retry) Assert(tb testing.TB, blk func(it It)) {
func (r Retry) Assert(tb testing.TB, blk func(t It)) {
tb.Helper()
var lastRecorder *doubles.RecorderTB

Expand Down
3 changes: 2 additions & 1 deletion assert/Eventually_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package assert_test

import (
"fmt"
"go.llib.dev/testcase/let"
"testing"
"time"

"go.llib.dev/testcase/let"

"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/internal/doubles"
"go.llib.dev/testcase/random"
Expand Down
3 changes: 2 additions & 1 deletion assert/equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package assert

import (
"fmt"
"go.llib.dev/testcase/internal/reflects"
"math/big"
"net"
"reflect"
"testing"
"time"

"go.llib.dev/testcase/internal/reflects"
)

func eq(tb testing.TB, exp, act any) bool {
Expand Down
5 changes: 3 additions & 2 deletions assert/message_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package assert_test

import (
"strings"
"testing"

"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/internal/doubles"
"go.llib.dev/testcase/random"
"strings"
"testing"
)

func ExampleMessage() {
Expand Down
2 changes: 1 addition & 1 deletion assert/pkgfunc.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func NotMatchRegexp[T ~string | []byte](tb testing.TB, v T, expr string, msg ...
Must(tb).NotMatchRegexp(string(v), expr, msg...)
}

func Eventually[T time.Duration | int](tb testing.TB, durationOrCount T, blk func(it It)) {
func Eventually[T time.Duration | int](tb testing.TB, durationOrCount T, blk func(t It)) {
tb.Helper()
Must(tb).Eventually(durationOrCount, blk)
}
Expand Down
3 changes: 2 additions & 1 deletion clock/Clock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package clock_test

import (
"context"
"go.llib.dev/testcase/let"
"testing"
"time"

"go.llib.dev/testcase/let"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/clock"
Expand Down
3 changes: 2 additions & 1 deletion internal/doubles/TB.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package doubles
import (
"bytes"
"fmt"
"go.llib.dev/testcase/sandbox"
"os"
"runtime"
"sync"
"testing"
"time"

"go.llib.dev/testcase/sandbox"

"go.llib.dev/testcase/internal/env"

"go.llib.dev/testcase/internal/teardown"
Expand Down
3 changes: 2 additions & 1 deletion internal/reflects/deepequal.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package reflects

import (
"go.llib.dev/testcase/internal/teardown"
"reflect"

"go.llib.dev/testcase/internal/teardown"
)

func DeepEqual(v1, v2 any) (bool, error) {
Expand Down
5 changes: 3 additions & 2 deletions internal/reflects/deepequal_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package reflects_test

import (
"go.llib.dev/testcase/internal/reflects"
"go.llib.dev/testcase/random"
"reflect"
"testing"

"go.llib.dev/testcase/internal/reflects"
"go.llib.dev/testcase/random"
)

func TestDeepEqual(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion let/As.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package let

import (
"fmt"
"go.llib.dev/testcase"
"reflect"

"go.llib.dev/testcase"
)

func As[To, From any](Var testcase.Var[From]) testcase.Var[To] {
Expand Down
5 changes: 3 additions & 2 deletions let/As_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package let_test

import (
"testing"
"time"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/let"
"go.llib.dev/testcase/sandbox"
"testing"
"time"
)

func TestAs(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion pp/Format.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ import (
"bytes"
"encoding/json"
"fmt"
"go.llib.dev/testcase/internal/reflects"
"io"
"reflect"
"sort"
"strings"
"sync"
"time"
"unicode/utf8"

"go.llib.dev/testcase/internal/reflects"
)

func Format(v any) string {
Expand Down
3 changes: 2 additions & 1 deletion pp/PP.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package pp

import (
"fmt"
"go.llib.dev/testcase/internal/caller"
"io"
"os"
"runtime"
"strings"

"go.llib.dev/testcase/internal/caller"
)

var defaultWriter io.Writer = os.Stderr
Expand Down
1 change: 1 addition & 0 deletions pp/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"fmt"

"go.llib.dev/testcase/pp"
)

Expand Down
3 changes: 2 additions & 1 deletion random/Unique.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package random

import (
"time"

"go.llib.dev/testcase/clock"
"go.llib.dev/testcase/internal/reflects"
"time"
)

// Unique function is a utility that helps with generating distinct values
Expand Down
3 changes: 2 additions & 1 deletion random/Unique_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package random_test

import (
"testing"

"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/clock/timecop"
"go.llib.dev/testcase/random"
"go.llib.dev/testcase/sandbox"
"testing"
)

func ExampleUnique() {
Expand Down
5 changes: 3 additions & 2 deletions random/pick_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package random_test

import (
"math/rand"
"testing"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/let"
"go.llib.dev/testcase/random"
"math/rand"
"testing"
)

func ExamplePick_randomValuePicking() {
Expand Down
5 changes: 3 additions & 2 deletions seed_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package testcase_test

import (
"strconv"
"testing"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/internal/doubles"
"strconv"
"testing"
)

func TestSpec_seed_T_Random(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package testcase

import (
"fmt"
"go.llib.dev/testcase/internal/env"
"testing"
"time"

"go.llib.dev/testcase/internal/env"
)

// SkipUntil is equivalent to SkipNow if the test is executing prior to the given deadline time.
Expand Down
9 changes: 5 additions & 4 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ package testcase_test

import (
"fmt"
"math/rand"
"os"
"testing"
"time"

"go.llib.dev/testcase"
"go.llib.dev/testcase/assert"
"go.llib.dev/testcase/internal/doubles"
"go.llib.dev/testcase/internal/env"
"go.llib.dev/testcase/random"
"go.llib.dev/testcase/sandbox"
"math/rand"
"os"
"testing"
"time"
)

func TestSkipUntil(t *testing.T) {
Expand Down

0 comments on commit f80f420

Please sign in to comment.