• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Example / test for handling 'map' type using the backwards compatibility
2# in protobuf specification:
3# https://developers.google.com/protocol-buffers/docs/proto3#maps
4
5Import('env')
6
7env.NanopbProto(['map', 'map.options'])
8
9enc = env.Program(['encode_map.c',
10                'map.pb.c',
11                '$COMMON/pb_encode.o',
12                '$COMMON/pb_common.o'])
13
14dec = env.Program(['decode_map.c',
15                'map.pb.c',
16                '$COMMON/pb_decode.o',
17                '$COMMON/pb_common.o'])
18
19env.RunTest("message.pb", enc)
20env.RunTest("message.txt", [dec, 'message.pb'])
21
22