diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/SConstruct | 2 | ||||
-rw-r--r-- | tests/alltypes/alltypes.proto | 2 | ||||
-rw-r--r-- | tests/alltypes/decode_alltypes.c | 2 | ||||
-rw-r--r-- | tests/alltypes_proto3/SConscript | 2 | ||||
-rw-r--r-- | tests/anonymous_oneof/SConscript | 2 | ||||
-rw-r--r-- | tests/field_size_16/alltypes.proto | 2 | ||||
-rw-r--r-- | tests/field_size_16_proto3/SConscript | 2 | ||||
-rw-r--r-- | tests/field_size_32/alltypes.proto | 2 | ||||
-rw-r--r-- | tests/oneof/SConscript | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/tests/SConstruct b/tests/SConstruct index ae79f71..f998024 100644 --- a/tests/SConstruct +++ b/tests/SConstruct @@ -57,7 +57,7 @@ if not env.GetOption('clean'): if not stdbool or not stdint or not stddef or not string: conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'}) conf.env.Append(CPPPATH = "#../extra") - conf.env.Append(SYSHDR = '\\"pb_syshdr.h\\"') + conf.env.Append(SYSHDR = '\\"pb_syshdr.h\\"') if stdbool: conf.env.Append(CPPDEFINES = {'HAVE_STDBOOL_H': 1}) if stdint: conf.env.Append(CPPDEFINES = {'HAVE_STDINT_H': 1}) diff --git a/tests/alltypes/alltypes.proto b/tests/alltypes/alltypes.proto index b2250c0..2377180 100644 --- a/tests/alltypes/alltypes.proto +++ b/tests/alltypes/alltypes.proto @@ -100,7 +100,7 @@ message AllTypes { optional double opt_double = 53 [default = 4053]; optional string opt_string = 54 [default = "4054"]; - optional bytes opt_bytes = 55 [default = "4055"]; + optional bytes opt_bytes = 55 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 56; optional MyEnum opt_enum = 57 [default = Second]; optional EmptyMessage opt_emptymsg = 58; diff --git a/tests/alltypes/decode_alltypes.c b/tests/alltypes/decode_alltypes.c index 8d0c514..b74121f 100644 --- a/tests/alltypes/decode_alltypes.c +++ b/tests/alltypes/decode_alltypes.c @@ -135,7 +135,7 @@ bool check_alltypes(pb_istream_t *stream, int mode) TEST(strcmp(alltypes.opt_string, "4054") == 0); TEST(alltypes.has_opt_bytes == false); TEST(alltypes.opt_bytes.size == 4); - TEST(memcmp(alltypes.opt_bytes.bytes, "4055", 4) == 0); + TEST(memcmp(alltypes.opt_bytes.bytes, "\x34\x5C\x00\xff", 4) == 0); TEST(alltypes.has_opt_submsg == false); TEST(strcmp(alltypes.opt_submsg.substuff1, "1") == 0); TEST(alltypes.opt_submsg.substuff2 == 2); diff --git a/tests/alltypes_proto3/SConscript b/tests/alltypes_proto3/SConscript index c0b2fc1..4c2388e 100644 --- a/tests/alltypes_proto3/SConscript +++ b/tests/alltypes_proto3/SConscript @@ -8,7 +8,7 @@ if 'PROTOC_VERSION' in env: match = re.search('([0-9]+).([0-9]+).([0-9]+)', env['PROTOC_VERSION']) if match: - version = map(int, match.groups()) + version = list(map(int, match.groups())) # proto3 syntax is supported by protoc >= 3.0.0 if env.GetOption('clean') or (match and version[0] >= 3): diff --git a/tests/anonymous_oneof/SConscript b/tests/anonymous_oneof/SConscript index 1067228..20fd1cc 100644 --- a/tests/anonymous_oneof/SConscript +++ b/tests/anonymous_oneof/SConscript @@ -9,7 +9,7 @@ if 'PROTOC_VERSION' in env: match = re.search('([0-9]+).([0-9]+).([0-9]+)', env['PROTOC_VERSION']) if match: - version = map(int, match.groups()) + version = list(map(int, match.groups())) # Oneof is supported by protoc >= 2.6.0 if env.GetOption('clean') or (match and (version[0] > 2 or (version[0] == 2 and version[1] >= 6))): diff --git a/tests/field_size_16/alltypes.proto b/tests/field_size_16/alltypes.proto index 46ac46a..4e27059 100644 --- a/tests/field_size_16/alltypes.proto +++ b/tests/field_size_16/alltypes.proto @@ -99,7 +99,7 @@ message AllTypes { optional double opt_double = 10053 [default = 4053]; optional string opt_string = 10054 [default = "4054"]; - optional bytes opt_bytes = 10055 [default = "4055"]; + optional bytes opt_bytes = 10055 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 10056; optional MyEnum opt_enum = 10057 [default = Second]; optional EmptyMessage opt_emptymsg = 10058; diff --git a/tests/field_size_16_proto3/SConscript b/tests/field_size_16_proto3/SConscript index 912c038..4a8e16d 100644 --- a/tests/field_size_16_proto3/SConscript +++ b/tests/field_size_16_proto3/SConscript @@ -8,7 +8,7 @@ if 'PROTOC_VERSION' in env: match = re.search('([0-9]+).([0-9]+).([0-9]+)', env['PROTOC_VERSION']) if match: - version = map(int, match.groups()) + version = list(map(int, match.groups())) # proto3 syntax is supported by protoc >= 3.0.0 if env.GetOption('clean') or (match and version[0] >= 3): diff --git a/tests/field_size_32/alltypes.proto b/tests/field_size_32/alltypes.proto index ac76c8e..a05e3b9 100644 --- a/tests/field_size_32/alltypes.proto +++ b/tests/field_size_32/alltypes.proto @@ -99,7 +99,7 @@ message AllTypes { optional double opt_double = 10053 [default = 4053]; optional string opt_string = 10054 [default = "4054"]; - optional bytes opt_bytes = 10055 [default = "4055"]; + optional bytes opt_bytes = 10055 [default = "\x34\x5C\x00\xff"]; optional SubMessage opt_submsg = 10056; optional MyEnum opt_enum = 10057 [default = Second]; optional EmptyMessage opt_emptymsg = 10058; diff --git a/tests/oneof/SConscript b/tests/oneof/SConscript index 22634fb..928ce63 100644 --- a/tests/oneof/SConscript +++ b/tests/oneof/SConscript @@ -9,7 +9,7 @@ if 'PROTOC_VERSION' in env: match = re.search('([0-9]+).([0-9]+).([0-9]+)', env['PROTOC_VERSION']) if match: - version = map(int, match.groups()) + version = list(map(int, match.groups())) # Oneof is supported by protoc >= 2.6.0 if env.GetOption('clean') or (match and (version[0] > 2 or (version[0] == 2 and version[1] >= 6))): |