Skip to content

Commit

Permalink
Optimize test naming
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Sep 2, 2024
1 parent 3364f20 commit c6b6056
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion protocol/czar/err_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/mohanson/daze/lib/doa"
)

func TestErr(t *testing.T) {
func TestProtocolCzarErr(t *testing.T) {
er0 := errors.New("0")
er1 := errors.New("1")
e := NewErr()
Expand Down
12 changes: 6 additions & 6 deletions protocol/czar/mux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/mohanson/daze/lib/doa"
)

func TestProtocolMux(t *testing.T) {
func TestProtocolCzarMux(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand All @@ -30,7 +30,7 @@ func TestProtocolMux(t *testing.T) {
doa.Doa(doa.Try(io.ReadFull(cli, buf[:64])) == 64)
}

func TestProtocolMuxStreamClientClose(t *testing.T) {
func TestProtocolCzarMuxStreamClientClose(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand All @@ -42,7 +42,7 @@ func TestProtocolMuxStreamClientClose(t *testing.T) {
doa.Doa(doa.Err(cli.Write([]byte{0x00, 0x00, 0x00, 0x80})) == io.ErrClosedPipe)
}

func TestProtocolMuxStreamServerClose(t *testing.T) {
func TestProtocolCzarMuxStreamServerClose(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand All @@ -57,7 +57,7 @@ func TestProtocolMuxStreamServerClose(t *testing.T) {
doa.Doa(doa.Err(io.ReadFull(cli, buf[:1])) == io.EOF)
}

func TestProtocolMuxClientClose(t *testing.T) {
func TestProtocolCzarMuxClientClose(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand All @@ -77,7 +77,7 @@ func TestProtocolMuxClientClose(t *testing.T) {
doa.Doa(strings.Contains(er2.Error(), "use of closed network connection"))
}

func TestProtocolMuxStreamClientReuse(t *testing.T) {
func TestProtocolCzarMuxStreamClientReuse(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand All @@ -99,7 +99,7 @@ func TestProtocolMuxStreamClientReuse(t *testing.T) {
cl1.Close()
}

func TestProtocolMuxServerRecvEvilPacket(t *testing.T) {
func TestProtocolCzarMuxServerRecvEvilPacket(t *testing.T) {
remote := Tester{daze.NewTester(EchoServerListenOn)}
remote.Mux()
defer remote.Close()
Expand Down
2 changes: 1 addition & 1 deletion protocol/czar/priority_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
)

func TestPriority(t *testing.T) {
func TestProtocolCzarPriority(t *testing.T) {
pri := NewPriority()
pri.H(func() error {
return nil
Expand Down
2 changes: 1 addition & 1 deletion protocol/czar/sip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/mohanson/daze/lib/doa"
)

func TestSip(t *testing.T) {
func TestProtocolCzarSip(t *testing.T) {
sid := NewSip()
for i := range 256 {
doa.Doa(doa.Try(sid.Get()) == uint8(i))
Expand Down

0 comments on commit c6b6056

Please sign in to comment.