cri-o/vendor/github.com/ugorji/go/codec/codecgen_test.go
Jacek J. Łakis bf51655a7b vendor: Update vendoring for the exec client and server implementations
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2017-04-24 18:38:41 +02:00

24 lines
497 B
Go

// +build x,codecgen
package codec
import (
"fmt"
"testing"
)
func _TestCodecgenJson1(t *testing.T) {
// This is just a simplistic test for codecgen.
// It is typically disabled. We only enable it for debugging purposes.
const callCodecgenDirect bool = true
v := newTestStruc(2, false, !testSkipIntf, false)
var bs []byte
e := NewEncoderBytes(&bs, testJsonH)
if callCodecgenDirect {
v.CodecEncodeSelf(e)
e.w.atEndOfEncode()
} else {
e.MustEncode(v)
}
fmt.Printf("%s\n", bs)
}