| 12345678910111213141516171819202122232425 |
- package toml
- import (
- "bytes"
- "testing"
- )
- type encodeSimple struct {
- Location string
- // Ages []int
- // DOB time.Time
- }
- func TestEncode(t *testing.T) {
- v := encodeSimple{
- Location: "Westborough, MA",
- }
- buf := new(bytes.Buffer)
- e := newEncoder(buf)
- if err := e.Encode(v); err != nil {
- t.Fatal(err)
- }
- testf(buf.String())
- }
|