generate: Flush the buffer before trying to compare it

This commit is contained in:
Sasha Koshka 2025-07-17 14:47:23 -04:00
parent 4955f66ad6
commit a257902705

View File

@ -45,6 +45,7 @@ func testGenerateRun(test *testing.T, protocol *Protocol, imports string, testCa
encoder := tape.NewEncoder(&buffer)
n, err := message.Encode(encoder)
if err != nil { log.Fatalf("at %d: %v\n", n, err) }
encoder.Flush()
got := buffer.Bytes()
log.Println("got: ", tu.HexBytes(got))
log.Println("correct:", correct)