X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/b25c4a19420c2fde1f290dd360c68b84e4eaa1ed..7bb8c198e96f367ea99ba649897b6b5716030e4b:/hotline/user_test.go?ds=sidebyside diff --git a/hotline/user_test.go b/hotline/user_test.go index 705dec0..214b1fb 100644 --- a/hotline/user_test.go +++ b/hotline/user_test.go @@ -77,8 +77,8 @@ func TestDecodeUserString(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if gotDecodedString := DecodeUserString(tt.args.encodedString); gotDecodedString != tt.wantDecodedString { - t.Errorf("DecodeUserString() = %v, want %v", gotDecodedString, tt.wantDecodedString) + if gotDecodedString := decodeString(tt.args.encodedString); gotDecodedString != tt.wantDecodedString { + t.Errorf("decodeString() = %v, want %v", gotDecodedString, tt.wantDecodedString) } }) } @@ -105,12 +105,12 @@ func TestNegatedUserString(t *testing.T) { args: args{ encodedString: []byte("foo1"), }, - want: []byte{0x99, 0x90, 0x90, 0xce }, + want: []byte{0x99, 0x90, 0x90, 0xce}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := negateString(tt.args.encodedString); !bytes.Equal(got, tt.want) { + if got := encodeString(tt.args.encodedString); !bytes.Equal(got, tt.want) { t.Errorf("NegatedUserString() = %x, want %x", got, tt.want) } })