Skip to content

Commit

Permalink
test: Amends to TestGetObjectHorizontalCoordinatesForDay() suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
michealroberts committed Jun 20, 2022
1 parent 484161f commit 2cecce7
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 77 deletions.
154 changes: 77 additions & 77 deletions coverage.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
mode: atomic
github.com/observerly/dusk/pkg/dusk/coordinates.go:101.108,124.2 10 12982
github.com/observerly/dusk/pkg/dusk/coordinates.go:136.149,151.2 6 16488
github.com/observerly/dusk/pkg/dusk/epoch.go:31.56,33.2 1 26
github.com/observerly/dusk/pkg/dusk/epoch.go:41.48,46.2 2 124040
github.com/observerly/dusk/pkg/dusk/epoch.go:53.45,55.2 1 79
github.com/observerly/dusk/pkg/dusk/epoch.go:63.60,93.13 15 16493
github.com/observerly/dusk/pkg/dusk/epoch.go:97.2,97.12 1 16493
github.com/observerly/dusk/pkg/dusk/epoch.go:93.13,95.3 1 5505
github.com/observerly/dusk/pkg/dusk/epoch.go:106.74,114.11 4 16491
github.com/observerly/dusk/pkg/dusk/epoch.go:118.2,118.17 1 16491
github.com/observerly/dusk/pkg/dusk/epoch.go:114.11,116.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:127.65,138.2 4 36
github.com/observerly/dusk/pkg/dusk/epoch.go:146.76,154.2 3 77943
github.com/observerly/dusk/pkg/dusk/epoch.go:162.73,170.2 3 13017
github.com/observerly/dusk/pkg/dusk/epoch.go:179.62,190.2 3 6
github.com/observerly/dusk/pkg/dusk/epoch.go:198.73,213.12 6 4
github.com/observerly/dusk/pkg/dusk/epoch.go:217.2,217.11 1 4
github.com/observerly/dusk/pkg/dusk/epoch.go:213.12,215.3 1 4
github.com/observerly/dusk/pkg/dusk/epoch.go:226.77,248.12 10 3
github.com/observerly/dusk/pkg/dusk/epoch.go:252.2,252.11 1 3
github.com/observerly/dusk/pkg/dusk/epoch.go:248.12,250.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:262.70,267.2 2 34
github.com/observerly/dusk/pkg/dusk/epoch.go:276.95,280.13 2 25
github.com/observerly/dusk/pkg/dusk/epoch.go:284.2,284.12 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:280.13,282.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:294.92,312.12 9 25
github.com/observerly/dusk/pkg/dusk/epoch.go:317.2,317.13 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:321.2,324.11 2 25
github.com/observerly/dusk/pkg/dusk/epoch.go:328.2,328.21 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:312.12,314.3 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:317.13,319.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:324.11,326.3 1 1
github.com/observerly/dusk/pkg/dusk/lawrence.go:15.59,24.12 3 3
github.com/observerly/dusk/pkg/dusk/lawrence.go:28.2,28.11 1 3
github.com/observerly/dusk/pkg/dusk/lawrence.go:24.12,26.3 1 0
Expand Down Expand Up @@ -94,83 +126,6 @@ github.com/observerly/dusk/pkg/dusk/lunar.go:855.30,857.4 1 4
github.com/observerly/dusk/pkg/dusk/lunar.go:874.106,877.16 2 2
github.com/observerly/dusk/pkg/dusk/lunar.go:881.2,884.8 1 2
github.com/observerly/dusk/pkg/dusk/lunar.go:877.16,879.3 1 0
github.com/observerly/dusk/pkg/dusk/solar.go:23.45,26.2 1 42
github.com/observerly/dusk/pkg/dusk/solar.go:35.50,38.2 1 32
github.com/observerly/dusk/pkg/dusk/solar.go:47.62,50.2 1 31
github.com/observerly/dusk/pkg/dusk/solar.go:60.74,62.2 1 27
github.com/observerly/dusk/pkg/dusk/solar.go:73.46,75.2 1 28
github.com/observerly/dusk/pkg/dusk/solar.go:83.47,88.11 2 12990
github.com/observerly/dusk/pkg/dusk/solar.go:92.2,92.10 1 12990
github.com/observerly/dusk/pkg/dusk/solar.go:88.11,90.3 1 10
github.com/observerly/dusk/pkg/dusk/solar.go:108.110,114.2 2 27
github.com/observerly/dusk/pkg/dusk/solar.go:125.146,133.16 4 3
github.com/observerly/dusk/pkg/dusk/solar.go:137.2,141.8 1 3
github.com/observerly/dusk/pkg/dusk/solar.go:133.16,135.3 1 0
github.com/observerly/dusk/pkg/dusk/solar.go:153.142,181.2 12 26
github.com/observerly/dusk/pkg/dusk/solar.go:189.70,200.2 4 4
github.com/observerly/dusk/pkg/dusk/solar.go:208.74,222.12 6 2
github.com/observerly/dusk/pkg/dusk/solar.go:226.2,229.3 1 2
github.com/observerly/dusk/pkg/dusk/solar.go:222.12,224.3 1 2
github.com/observerly/dusk/pkg/dusk/utils.go:15.34,17.2 1 7
github.com/observerly/dusk/pkg/dusk/utils.go:26.55,31.12 2 12986
github.com/observerly/dusk/pkg/dusk/utils.go:35.2,35.11 1 12986
github.com/observerly/dusk/pkg/dusk/utils.go:31.12,33.3 1 0
github.com/observerly/dusk/pkg/dusk/utils.go:47.84,49.2 1 4
github.com/observerly/dusk/pkg/dusk/utils.go:60.84,62.2 1 12986
github.com/observerly/dusk/pkg/dusk/utils.go:72.85,74.2 1 25
github.com/observerly/dusk/pkg/dusk/utils.go:83.57,85.2 1 2
github.com/observerly/dusk/pkg/dusk/utils.go:93.51,95.2 1 3
github.com/observerly/dusk/pkg/dusk/utils.go:103.52,106.2 2 1
github.com/observerly/dusk/pkg/dusk/coordinates.go:101.108,124.2 10 12982
github.com/observerly/dusk/pkg/dusk/coordinates.go:136.149,151.2 6 16488
github.com/observerly/dusk/pkg/dusk/epoch.go:31.56,33.2 1 26
github.com/observerly/dusk/pkg/dusk/epoch.go:41.48,46.2 2 124040
github.com/observerly/dusk/pkg/dusk/epoch.go:53.45,55.2 1 79
github.com/observerly/dusk/pkg/dusk/epoch.go:63.60,93.13 15 16493
github.com/observerly/dusk/pkg/dusk/epoch.go:97.2,97.12 1 16493
github.com/observerly/dusk/pkg/dusk/epoch.go:93.13,95.3 1 5505
github.com/observerly/dusk/pkg/dusk/epoch.go:106.74,114.11 4 16491
github.com/observerly/dusk/pkg/dusk/epoch.go:118.2,118.17 1 16491
github.com/observerly/dusk/pkg/dusk/epoch.go:114.11,116.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:127.65,138.2 4 36
github.com/observerly/dusk/pkg/dusk/epoch.go:146.76,154.2 3 77943
github.com/observerly/dusk/pkg/dusk/epoch.go:162.73,170.2 3 13017
github.com/observerly/dusk/pkg/dusk/epoch.go:179.62,190.2 3 6
github.com/observerly/dusk/pkg/dusk/epoch.go:198.73,213.12 6 4
github.com/observerly/dusk/pkg/dusk/epoch.go:217.2,217.11 1 4
github.com/observerly/dusk/pkg/dusk/epoch.go:213.12,215.3 1 4
github.com/observerly/dusk/pkg/dusk/epoch.go:226.77,248.12 10 3
github.com/observerly/dusk/pkg/dusk/epoch.go:252.2,252.11 1 3
github.com/observerly/dusk/pkg/dusk/epoch.go:248.12,250.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:262.70,267.2 2 34
github.com/observerly/dusk/pkg/dusk/epoch.go:276.95,280.13 2 25
github.com/observerly/dusk/pkg/dusk/epoch.go:284.2,284.12 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:280.13,282.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:294.92,312.12 9 25
github.com/observerly/dusk/pkg/dusk/epoch.go:317.2,317.13 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:321.2,324.11 2 25
github.com/observerly/dusk/pkg/dusk/epoch.go:328.2,328.21 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:312.12,314.3 1 25
github.com/observerly/dusk/pkg/dusk/epoch.go:317.13,319.3 1 0
github.com/observerly/dusk/pkg/dusk/epoch.go:324.11,326.3 1 1
github.com/observerly/dusk/pkg/dusk/trigonometry.go:10.30,12.2 1 291239
github.com/observerly/dusk/pkg/dusk/trigonometry.go:14.30,16.2 1 212437
github.com/observerly/dusk/pkg/dusk/trigonometry.go:18.44,20.2 1 541
github.com/observerly/dusk/pkg/dusk/trigonometry.go:22.30,24.2 1 13105
github.com/observerly/dusk/pkg/dusk/trigonometry.go:26.31,28.2 1 42489
github.com/observerly/dusk/pkg/dusk/trigonometry.go:30.31,32.2 1 16543
github.com/observerly/dusk/pkg/dusk/trigonometry.go:34.31,36.2 1 1
github.com/observerly/dusk/pkg/dusk/trigonometry.go:38.36,40.2 1 25976
github.com/observerly/dusk/pkg/dusk/twilight.go:38.163,49.16 5 9
github.com/observerly/dusk/pkg/dusk/twilight.go:53.2,57.18 1 9
github.com/observerly/dusk/pkg/dusk/twilight.go:49.16,51.3 1 0
github.com/observerly/dusk/pkg/dusk/twilight.go:69.139,74.2 2 3
github.com/observerly/dusk/pkg/dusk/twilight.go:85.142,90.2 2 3
github.com/observerly/dusk/pkg/dusk/twilight.go:101.146,106.2 2 3
github.com/observerly/dusk/pkg/dusk/astrometry.go:14.52,18.12 2 16490
github.com/observerly/dusk/pkg/dusk/astrometry.go:22.2,22.11 1 16490
github.com/observerly/dusk/pkg/dusk/astrometry.go:18.12,20.3 1 3388
github.com/observerly/dusk/pkg/dusk/astrometry.go:34.73,42.2 4 4
github.com/observerly/dusk/pkg/dusk/transit.go:23.77,31.2 3 31
github.com/observerly/dusk/pkg/dusk/transit.go:42.135,43.43 1 12
github.com/observerly/dusk/pkg/dusk/transit.go:52.2,75.3 9 12
Expand Down Expand Up @@ -209,3 +164,48 @@ github.com/observerly/dusk/pkg/dusk/transit.go:270.16,272.3 1 0
github.com/observerly/dusk/pkg/dusk/transit.go:274.47,281.3 1 1
github.com/observerly/dusk/pkg/dusk/transit.go:291.39,304.91 4 1639
github.com/observerly/dusk/pkg/dusk/transit.go:304.91,306.4 1 464
github.com/observerly/dusk/pkg/dusk/astrometry.go:14.52,18.12 2 16490
github.com/observerly/dusk/pkg/dusk/astrometry.go:22.2,22.11 1 16490
github.com/observerly/dusk/pkg/dusk/astrometry.go:18.12,20.3 1 3388
github.com/observerly/dusk/pkg/dusk/astrometry.go:34.73,42.2 4 4
github.com/observerly/dusk/pkg/dusk/solar.go:23.45,26.2 1 42
github.com/observerly/dusk/pkg/dusk/solar.go:35.50,38.2 1 32
github.com/observerly/dusk/pkg/dusk/solar.go:47.62,50.2 1 31
github.com/observerly/dusk/pkg/dusk/solar.go:60.74,62.2 1 27
github.com/observerly/dusk/pkg/dusk/solar.go:73.46,75.2 1 28
github.com/observerly/dusk/pkg/dusk/solar.go:83.47,88.11 2 12990
github.com/observerly/dusk/pkg/dusk/solar.go:92.2,92.10 1 12990
github.com/observerly/dusk/pkg/dusk/solar.go:88.11,90.3 1 10
github.com/observerly/dusk/pkg/dusk/solar.go:108.110,114.2 2 27
github.com/observerly/dusk/pkg/dusk/solar.go:125.146,133.16 4 3
github.com/observerly/dusk/pkg/dusk/solar.go:137.2,141.8 1 3
github.com/observerly/dusk/pkg/dusk/solar.go:133.16,135.3 1 0
github.com/observerly/dusk/pkg/dusk/solar.go:153.142,181.2 12 26
github.com/observerly/dusk/pkg/dusk/solar.go:189.70,200.2 4 4
github.com/observerly/dusk/pkg/dusk/solar.go:208.74,222.12 6 2
github.com/observerly/dusk/pkg/dusk/solar.go:226.2,229.3 1 2
github.com/observerly/dusk/pkg/dusk/solar.go:222.12,224.3 1 2
github.com/observerly/dusk/pkg/dusk/trigonometry.go:10.30,12.2 1 291239
github.com/observerly/dusk/pkg/dusk/trigonometry.go:14.30,16.2 1 212437
github.com/observerly/dusk/pkg/dusk/trigonometry.go:18.44,20.2 1 541
github.com/observerly/dusk/pkg/dusk/trigonometry.go:22.30,24.2 1 13105
github.com/observerly/dusk/pkg/dusk/trigonometry.go:26.31,28.2 1 42489
github.com/observerly/dusk/pkg/dusk/trigonometry.go:30.31,32.2 1 16543
github.com/observerly/dusk/pkg/dusk/trigonometry.go:34.31,36.2 1 1
github.com/observerly/dusk/pkg/dusk/trigonometry.go:38.36,40.2 1 25976
github.com/observerly/dusk/pkg/dusk/twilight.go:38.163,49.16 5 9
github.com/observerly/dusk/pkg/dusk/twilight.go:53.2,57.18 1 9
github.com/observerly/dusk/pkg/dusk/twilight.go:49.16,51.3 1 0
github.com/observerly/dusk/pkg/dusk/twilight.go:69.139,74.2 2 3
github.com/observerly/dusk/pkg/dusk/twilight.go:85.142,90.2 2 3
github.com/observerly/dusk/pkg/dusk/twilight.go:101.146,106.2 2 3
github.com/observerly/dusk/pkg/dusk/utils.go:15.34,17.2 1 7
github.com/observerly/dusk/pkg/dusk/utils.go:26.55,31.12 2 12986
github.com/observerly/dusk/pkg/dusk/utils.go:35.2,35.11 1 12986
github.com/observerly/dusk/pkg/dusk/utils.go:31.12,33.3 1 0
github.com/observerly/dusk/pkg/dusk/utils.go:47.84,49.2 1 4
github.com/observerly/dusk/pkg/dusk/utils.go:60.84,62.2 1 12986
github.com/observerly/dusk/pkg/dusk/utils.go:72.85,74.2 1 25
github.com/observerly/dusk/pkg/dusk/utils.go:83.57,85.2 1 2
github.com/observerly/dusk/pkg/dusk/utils.go:93.51,95.2 1 3
github.com/observerly/dusk/pkg/dusk/utils.go:103.52,106.2 2 1
8 changes: 8 additions & 0 deletions pkg/dusk/transit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ func TestGetObjectHorizontalCoordinatesForDay(t *testing.T) {
t.Errorf("got %q", err)
}

if got[0].Datetime.String() != "2022-05-14 00:00:00 -1000 HST" {
t.Errorf("got %v, wanted %v", got[0].Datetime, "2022-05-14 00:00:00 -1000 HST")
}

if got[1439].Datetime.String() != "2022-05-14 23:59:00 -1000 HST" {
t.Errorf("got %v, wanted %v", got[1439].Datetime, "2022-05-14 23:59:00 -1000 HST")
}

if got[517].Datetime.String() != "2022-05-14 08:37:00 -1000 HST" && !got[517].IsRise {
t.Errorf("We're expecting Betelgeuse to rise at 8:37am on 14th May 2022")
}
Expand Down

0 comments on commit 2cecce7

Please sign in to comment.