...

Source file src/gotest.tools/v3/golden/example_test.go

Documentation: gotest.tools/v3/golden

     1  package golden_test
     2  
     3  import (
     4  	"testing"
     5  
     6  	"gotest.tools/v3/assert"
     7  	"gotest.tools/v3/golden"
     8  )
     9  
    10  var t = &testing.T{}
    11  
    12  func ExampleAssert() {
    13  	golden.Assert(t, "foo", "foo-content.golden")
    14  }
    15  
    16  func ExampleString() {
    17  	assert.Assert(t, golden.String("foo", "foo-content.golden"))
    18  }
    19  
    20  func ExampleAssertBytes() {
    21  	golden.AssertBytes(t, []byte("foo"), "foo-content.golden")
    22  }
    23  

View as plain text