Skip to content

Commit

Permalink
errors
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Jun 30, 2024
1 parent b367dc6 commit 07acd3a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions value/maybe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ func TestJust(t *testing.T) {
}
})
t.Run("NoErr", func(t *testing.T) {
got := value.JustErr(strconv.Atoi("1"))
got := value.JustNoError(strconv.Atoi("1"))
if want := value.Just(1); got != want {
t.Errorf("JustErr(1): got %v, want %v", got, want)
t.Errorf("JustNoError(1): got %v, want %v", got, want)
}
})
t.Run("Err", func(t *testing.T) {
got := value.JustErr(strconv.Atoi("bogus"))
got := value.JustNoError(strconv.Atoi("bogus"))
if got.Present() {
t.Errorf("JustErr(bogus): got %v, want absent", got)
t.Errorf("JustNoError(bogus): got %v, want absent", got)
}
})
}
Expand Down

0 comments on commit 07acd3a

Please sign in to comment.