SConscript 508 B

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