1# Build and run a basic round-trip test using memory buffer encoding. 2 3Import("env") 4 5enc = env.Program(["encode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) 6dec = env.Program(["decode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) 7 8env.RunTest(enc) 9env.RunTest([dec, "encode_buffer.output"]) 10env.Decode(["encode_buffer.output", "$COMMON/person.proto"], MESSAGE = "Person") 11env.Compare(["decode_buffer.output", "encode_buffer.decoded"]) 12 13