github.com/v2pro/plz@v0.0.0-20221028024117-e5f9aec5b631/msgfmt/jsonfmt/level_0/time_test.go (about)

     1  package test
     2  
     3  import (
     4  	"testing"
     5  	"github.com/v2pro/plz/msgfmt/jsonfmt"
     6  	"time"
     7  	"github.com/v2pro/plz/test"
     8  	"github.com/v2pro/plz/countlog"
     9  	"github.com/v2pro/plz/test/must"
    10  )
    11  
    12  func Test_time(t *testing.T) {
    13  	t.Run("epoch", test.Case(func(ctx *countlog.Context) {
    14  		must.Equal(`"0001-01-01T00:00:00Z"`, jsonfmt.MarshalToString(time.Time{}))
    15  	}))
    16  }