Skip to content

Commit

Permalink
Quell a SonarCloud code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
mjradwin committed Jan 30, 2024
1 parent e5c3279 commit a3a1d27
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hebcal/holidays_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,12 @@ func TestModernFriSatMovetoThu(t *testing.T) {
}

func TestBirkatHachamah(t *testing.T) {
const birkatHachamah = "Birkat Hachamah"
actual := make([]int, 0, 10)
for year := 5650; year < 5920; year++ {
events := hebcal.GetHolidaysForYear(year, false)
for _, ev := range events {
if ev.Desc == "Birkat Hachamah" {
if ev.Desc == birkatHachamah {
actual = append(actual, year)
}
}
Expand All @@ -332,7 +333,7 @@ func TestBirkatHachamah(t *testing.T) {
events := hebcal.GetHolidaysForYear(5965, false)
var hd hdate.HDate
for _, ev := range events {
if ev.Desc == "Birkat Hachamah" {
if ev.Desc == birkatHachamah {
hd = ev.Date
}
}
Expand All @@ -341,7 +342,7 @@ func TestBirkatHachamah(t *testing.T) {
hd = hdate.HDate{}
events = hebcal.GetHolidaysForYear(5993, false)
for _, ev := range events {
if ev.Desc == "Birkat Hachamah" {
if ev.Desc == birkatHachamah {
hd = ev.Date
}
}
Expand Down

0 comments on commit a3a1d27

Please sign in to comment.