MCPcopy
hub / github.com/dropbox/godropbox / TestBasicStreamHex

Method TestBasicStreamHex

encoding2/hex_test.go:19–31  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

17var _ = Suite(&HexSuite{})
18
19func (s *HexSuite) TestBasicStreamHex(c *C) {
20 w := bytes.NewBuffer(nil)
21 HexEncodeToWriter(w, []byte("foo"))
22 c.Assert(w.String(), Equals, "666f6f")
23
24 w = bytes.NewBuffer(nil)
25 HexEncodeToWriter(w, []byte(""))
26 c.Assert(w.String(), Equals, "")
27
28 w = bytes.NewBuffer(nil)
29 HexEncodeToWriter(w, []byte("\x00\x01"))
30 c.Assert(w.String(), Equals, "0001")
31}

Callers

nothing calls this directly

Calls 2

HexEncodeToWriterFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected