generate: Describe more values in tests
This commit is contained in:
parent
f402b46b1c
commit
f10327356e
@ -100,12 +100,12 @@ func testGenerateRun(test *testing.T, protocol *Protocol, title, imports, testCa
|
||||
log.Println("decoding:")
|
||||
destination := reflect.New(reflect.ValueOf(message).Elem().Type()).Interface().(Message)
|
||||
flat := data.Flatten()
|
||||
log.Println("before: ", destination)
|
||||
log.Println("before: ", tu.Describe(destination))
|
||||
decoder := tape.NewDecoder(bytes.NewBuffer(flat))
|
||||
n, err = destination.Decode(decoder)
|
||||
if err != nil { log.Fatalf("at %d: %v\n", n, err) }
|
||||
log.Println("got: ", destination)
|
||||
log.Println("correct:", message)
|
||||
log.Println("got: ", tu.Describe(destination))
|
||||
log.Println("correct:", tu.Describe(message))
|
||||
if n != len(flat) {
|
||||
log.Fatalf("n incorrect: %d != %d\n", n, len(flat))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user