Skip to content

Commit

Permalink
Add test for astronomical dusk
Browse files Browse the repository at this point in the history
  • Loading branch information
sj14 committed Jun 30, 2021
1 parent 76c0760 commit a608eef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ func TestDusk(t *testing.T) {
{args: args{observer: london, date: time.Date(2015, 12, 12, 0, 0, 0, 0, time.UTC), depression: DepressionNautical}, want: time.Date(2015, 12, 12, 17, 14, 0, 0, time.UTC)},
{args: args{observer: london, date: time.Date(2015, 12, 25, 0, 0, 0, 0, time.UTC), depression: DepressionNautical}, want: time.Date(2015, 12, 25, 17, 19, 0, 0, time.UTC)},
// Astronomical

{args: args{observer: london, date: time.Date(2015, 12, 25, 0, 0, 0, 0, time.UTC), depression: DepressionAstronomical}, want: time.Date(2015, 12, 25, 17, 59, 0, 0, time.UTC)},
{args: args{observer: london, date: time.Date(2021, 30, 6, 0, 0, 0, 0, time.UTC), depression: DepressionAstronomical}, wantErr: true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit a608eef

Please sign in to comment.