firmware/extra/nanopb/tests/map/SConscript
Patrick Moessler 0c83634f42 Initial commit
2019-10-13 00:37:11 +02:00

21 lines
593 B
Python

# Example / test for handling 'map' type using the backwards compatibility
# in protobuf specification:
# https://developers.google.com/protocol-buffers/docs/proto3#maps
Import('env')
env.NanopbProto(['map', 'map.options'])
enc = env.Program(['encode_map.c',
'map.pb.c',
'$COMMON/pb_encode.o',
'$COMMON/pb_common.o'])
dec = env.Program(['decode_map.c',
'map.pb.c',
'$COMMON/pb_decode.o',
'$COMMON/pb_common.o'])
env.RunTest("message.pb", enc)
env.RunTest("message.txt", [dec, 'message.pb'])