SConscript 525 B

1234567891011121314
  1. # Test the functionality of the callback fields.
  2. Import("env")
  3. env.NanopbProto("callbacks")
  4. enc = env.Program(["encode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"])
  5. dec = env.Program(["decode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"])
  6. env.RunTest(enc)
  7. env.RunTest([dec, "encode_callbacks.output"])
  8. env.Decode(["encode_callbacks.output", "callbacks.proto"], MESSAGE = "TestMessage")
  9. env.Compare(["decode_callbacks.output", "encode_callbacks.decoded"])