diff options
author | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-03-28 18:53:18 +0200 |
---|---|---|
committer | Rasmus Dahlberg <rasmus@mullvad.net> | 2022-03-28 19:10:49 +0200 |
commit | 4e4a55c54cefbd7e9e5c0915420cba46fa657b8b (patch) | |
tree | aba7732e72a524358775f958bd1e317ee64cc43c /pkg/types/encoding_test.go | |
parent | 2420cff48ae963f07412b70909d178f332d25058 (diff) |
remove dead code
Diffstat (limited to 'pkg/types/encoding_test.go')
-rw-r--r-- | pkg/types/encoding_test.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/pkg/types/encoding_test.go b/pkg/types/encoding_test.go index e079a8c..a050002 100644 --- a/pkg/types/encoding_test.go +++ b/pkg/types/encoding_test.go @@ -27,37 +27,3 @@ func TestPutSSHString(t *testing.T) { } } } - -func TestGetSSHString(t *testing.T) { - for _, tbl := range []struct { - desc string - in []byte - want string - wantErr bool - }{ - { - desc: "valid", - in: []byte{0, 0, 0, 5, 65, 108, 108, 97, 110}, - want: "Allan", - }, - { - desc: "invalid: short", - in: []byte{0, 0, 0}, - wantErr: true, - }, - } { - str, err := getSSHString(tbl.in) - - if got, want := err != nil, tbl.wantErr; got != want { - t.Errorf("%q: error: got %v but wanted %v: %v", tbl.desc, got, want, err) - } - - if err != nil { - continue - } - - if got, want := str, tbl.want; *got != want { - t.Errorf(`%q: got "%v" but wanted "%v"`, tbl.desc, *got, want) - } - } -} |