mirror of https://github.com/fluffle/goirc
Run gofmt over code, it's been a while.
This commit is contained in:
parent
18c20080e8
commit
c400a2141a
|
@ -346,8 +346,8 @@ func TestMODE(t *testing.T) {
|
|||
cm := test1.Modes
|
||||
|
||||
// Verify the ChanPrivs exists and modes we're testing aren't set
|
||||
if cp, ok := user1.Channels[test1]; (!ok || c.Me.Channels[test1].Voice ||
|
||||
cp.Op || cm.Key != "" || cm.InviteOnly || cm.Secret) {
|
||||
if cp, ok := user1.Channels[test1]; !ok || c.Me.Channels[test1].Voice ||
|
||||
cp.Op || cm.Key != "" || cm.InviteOnly || cm.Secret {
|
||||
t.Errorf("Channel privileges in unexpected state before MODE.")
|
||||
}
|
||||
|
||||
|
@ -589,8 +589,7 @@ func Test353(t *testing.T) {
|
|||
t.Errorf("353 handler failed to op known nick user1.")
|
||||
}
|
||||
|
||||
if p := get("user2");
|
||||
p == nil || p.Voice || p.HalfOp || p.Op || p.Admin || p.Owner {
|
||||
if p := get("user2"); p == nil || p.Voice || p.HalfOp || p.Op || p.Admin || p.Owner {
|
||||
t.Errorf("353 handler set modes on new nick user2.")
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ type mockNetConn struct {
|
|||
rt, wt int64
|
||||
}
|
||||
|
||||
func MockNetConn(t *testing.T) (*mockNetConn) {
|
||||
func MockNetConn(t *testing.T) *mockNetConn {
|
||||
// Our mock connection is a testing object
|
||||
m := &mockNetConn{T: t}
|
||||
m.closers = make([]chan bool, 0, 3)
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
)
|
||||
|
||||
type HandlerID uint32
|
||||
|
||||
var hidCounter uint32 = 0
|
||||
|
||||
func NewHandlerID() HandlerID {
|
||||
|
|
|
@ -101,4 +101,3 @@ func TestSerialDispatch(t *testing.T) {
|
|||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue