github.com/abemedia/go-don@v0.2.2-0.20240329015135-be88e32bb73b/encoding/toml/toml_test.go (about)

     1  package toml_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/abemedia/go-don/internal/test"
     7  )
     8  
     9  type item struct {
    10  	Foo string `toml:"foo"`
    11  }
    12  
    13  var opt = test.EncodingOptions[item]{
    14  	Mime:   "application/toml",
    15  	Raw:    `foo = "bar"` + "\n",
    16  	Parsed: item{Foo: "bar"},
    17  }
    18  
    19  func TestTOML(t *testing.T) {
    20  	test.Encoding(t, opt)
    21  }
    22  
    23  func BenchmarkTOML(b *testing.B) {
    24  	test.BenchmarkEncoding(b, opt)
    25  }