File: SConscript

package info (click to toggle)
nanopb 0.4.9.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,676 kB
  • sloc: ansic: 12,144; python: 2,795; cpp: 190; sh: 163; makefile: 85
file content (22 lines) | stat: -rw-r--r-- 726 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Test that different sizes of enum fields are properly encoded and decoded.

Import('env')

env.NanopbProto('packed_enum')
p = env.Program(["packed_enum_unittests.c",
                 "packed_enum.pb.c",
                 "$COMMON/pb_encode.o",
                 "$COMMON/pb_decode.o",
                 "$COMMON/pb_common.o"])
env.RunTest(p)

# Enum size specification is supported by C++11 and newer
env2 = env.Clone()
env2.Append(CXXFLAGS = "-std=c++11")
env2.NanopbProtoCpp('enum_intsize')
p2 = env2.Program(["enum_intsize_unittests.cc",
                   "enum_intsize.pb.cpp",
                   "$COMMON/pb_encode.o",
                   "$COMMON/pb_decode.o",
                   "$COMMON/pb_common.o"])
env2.RunTest(p2)