MCPcopy Create free account
hub / github.com/go-git/go-git / TestEncode

Method TestEncode

plumbing/format/config/encoder_test.go:13–21  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

11var _ = Suite(&EncoderSuite{})
12
13func (s *EncoderSuite) TestEncode(c *C) {
14 for idx, fixture := range fixtures {
15 buf := &bytes.Buffer{}
16 e := NewEncoder(buf)
17 err := e.Encode(fixture.Config)
18 c.Assert(err, IsNil, Commentf("encoder error for fixture: %d", idx))
19 c.Assert(buf.String(), Equals, fixture.Text, Commentf("bad result for fixture: %d", idx))
20 }
21}

Callers

nothing calls this directly

Calls 3

EncodeMethod · 0.95
NewEncoderFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected