From a608eef9a7983d252a856ee064a181d34432de7f Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 30 Jun 2021 17:24:41 +0200 Subject: [PATCH] Add test for astronomical dusk --- sun_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sun_test.go b/sun_test.go index 4e6b769..57181da 100644 --- a/sun_test.go +++ b/sun_test.go @@ -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) {