diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-08 00:19:33 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-08 00:19:33 +0200 |
commit | fde18e485ff7cbc7b2e33dade8e81136f06a5b60 (patch) | |
tree | 79a6dbd13e7e4a46e708a70104c548f403b477ae /vendor/github.com/getlantern/hidden/hidden_test.go | |
parent | 93e1de570f47b095905835735dbd67479aa0c2de (diff) |
[pkg] remove vendor
Diffstat (limited to 'vendor/github.com/getlantern/hidden/hidden_test.go')
-rw-r--r-- | vendor/github.com/getlantern/hidden/hidden_test.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/github.com/getlantern/hidden/hidden_test.go b/vendor/github.com/getlantern/hidden/hidden_test.go deleted file mode 100644 index 420ce64..0000000 --- a/vendor/github.com/getlantern/hidden/hidden_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package hidden - -import ( - "encoding/binary" - "fmt" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestRoundTrip(t *testing.T) { - str := "H" - encoded := ToString([]byte(str)) - rt, err := FromString(encoded) - if assert.NoError(t, err) { - assert.Equal(t, str, string(rt)) - } -} - -func TestExtract(t *testing.T) { - a := []byte("Here is my string") - b := make([]byte, 8) - binary.BigEndian.PutUint64(b, 56) - str := fmt.Sprintf("hidden%s data%s is fun", ToString(a), ToString(b)) - t.Log(str) - out, err := Extract(str) - if assert.NoError(t, err) { - if assert.Len(t, out, 2) { - assert.Equal(t, out, [][]byte{a, b}) - } - } - assert.Equal(t, "hidden data is fun", Clean(str)) -} |