mirror of
https://github.com/prymitive/karma
synced 2026-05-21 04:33:07 +00:00
This PR is a result of running 'dep init' followed by 'make vendor', it removes govendor file and creates dep Gopkg.* files.
25 lines
497 B
Go
25 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)
|
|
}
|