Skip to content

Commit

Permalink
update bus_test for 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
tot0p committed Feb 26, 2024
1 parent 3208d06 commit 7d20812
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions interpreter/bus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,20 @@ func TestNewNoneBus(t *testing.T) {
t.Errorf("Expected %s, got %d", "BUS_NONE", t1.Type)
}
}

func TestIsMultipleBus(t *testing.T) {
var allBus []*Bus
t1 := NewNoneBus()
allBus = append(allBus, t1)

if IsMultipleBus(allBus) {
t.Errorf("Expected %s, got %s", "false", "true")
}

t2 := NewMainBus(nil)
allBus = append(allBus, t2)

if !IsMultipleBus(allBus) {
t.Errorf("Expected %s, got %s", "true", "false")
}
}

0 comments on commit 7d20812

Please sign in to comment.