Skip to content

Commit

Permalink
fix: amend TestNewTelescopeDeclinationRate in @observerly/alpacago.
Browse files Browse the repository at this point in the history
fix: amend TestNewTelescopeDeclinationRate in @observerly/alpacago.
  • Loading branch information
michealroberts committed Mar 7, 2024
1 parent a21a013 commit 01d3267
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/alpacago/telescope_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,18 +628,16 @@ func TestNewTelescopeDeclination(t *testing.T) {
func TestNewTelescopeDeclinationRate(t *testing.T) {
var got, err = telescope.GetDeclinationRate()

var want float64 = 5.000000

if err != nil {
t.Errorf("got %q, wanted %f", err, want)
t.Errorf("got %q", err)
}

if math.Abs(got-want) > 0.00001 {
t.Errorf("got %f, wanted %f", got, want)
if got < 0 || got > 24 {
t.Errorf("got %f, wanted a reasonable value between 0 and 24", got)
}

if telescope.Alpaca.ErrorNumber != 0 {
t.Errorf("got %q, wanted %f", telescope.Alpaca.ErrorMessage, want)
t.Errorf("got %q", telescope.Alpaca.ErrorMessage)
}
}

Expand Down

0 comments on commit 01d3267

Please sign in to comment.