1
0
Fork 0
forked from External/ergo

review fixes and updates

This commit is contained in:
Shivaram Lingamneni 2018-05-25 00:38:20 -04:00
parent 7122fb180c
commit d3815fbe61
6 changed files with 140 additions and 75 deletions

View file

@ -36,3 +36,17 @@ func TestParseDefaultChannelModes(t *testing.T) {
}
}
}
func TestUmodeGreaterThan(t *testing.T) {
if !umodeGreaterThan(modes.Halfop, modes.Voice) {
t.Errorf("expected Halfop > Voice")
}
if !umodeGreaterThan(modes.Voice, modes.Mode(0)) {
t.Errorf("expected Voice > 0 (the zero value of modes.Mode)")
}
if umodeGreaterThan(modes.ChannelAdmin, modes.ChannelAdmin) {
t.Errorf("modes should not be greater than themselves")
}
}