• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Test the functionality of the callback fields.
2
3Import("env")
4
5env.NanopbProto("callbacks")
6enc = env.Program(["encode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"])
7dec = env.Program(["decode_callbacks.c", "callbacks.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"])
8
9env.RunTest(enc)
10env.RunTest([dec, "encode_callbacks.output"])
11
12env.Decode(["encode_callbacks.output", "callbacks.proto"], MESSAGE = "TestMessage")
13env.Compare(["decode_callbacks.output", "encode_callbacks.decoded"])
14
15