From 32e25cbca210a359b09768537b6f443fe90a3070 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Tue, 20 Jun 2017 10:24:05 +0000 Subject: Separation Generator to a dedicated repo Change-Id: Id94831651c3266861435272a6e36c7884bef2c45 Signed-off-by: Romain Forlot --- libs/nanopb/tests/basic_buffer/SConscript | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 libs/nanopb/tests/basic_buffer/SConscript (limited to 'libs/nanopb/tests/basic_buffer/SConscript') diff --git a/libs/nanopb/tests/basic_buffer/SConscript b/libs/nanopb/tests/basic_buffer/SConscript new file mode 100644 index 0000000..acaf5ff --- /dev/null +++ b/libs/nanopb/tests/basic_buffer/SConscript @@ -0,0 +1,12 @@ +# Build and run a basic round-trip test using memory buffer encoding. + +Import("env") + +enc = env.Program(["encode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_encode.o", "$COMMON/pb_common.o"]) +dec = env.Program(["decode_buffer.c", "$COMMON/person.pb.c", "$COMMON/pb_decode.o", "$COMMON/pb_common.o"]) + +env.RunTest(enc) +env.RunTest([dec, "encode_buffer.output"]) +env.Decode(["encode_buffer.output", "$COMMON/person.proto"], MESSAGE = "Person") +env.Compare(["decode_buffer.output", "encode_buffer.decoded"]) + -- cgit 1.2.3-korg