Commit ec961cb0 authored by Robert Edmonds's avatar Robert Edmonds

t/: rename the required fields bitmap test case

parent cfb919f1
...@@ -1600,15 +1600,15 @@ test_alloc_fail (void) ...@@ -1600,15 +1600,15 @@ test_alloc_fail (void)
fields field1 and field129 with positions pos1 and pos2 (no matter what the fields field1 and field129 with positions pos1 and pos2 (no matter what the
field numbers are), such as (pos1 % 128) == (pos2 % 128). The decoder must field numbers are), such as (pos1 % 128) == (pos2 % 128). The decoder must
return NULL instead of incomplete message with field129 missing. */ return NULL instead of incomplete message with field129 missing. */
static void test_required_fields_bitmap_hashing(void) static void test_required_fields_bitmap(void)
{ {
const uint8_t source[] = { const uint8_t source[] = {
(1 << 3) | PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED, (1 << 3) | PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED,
sizeof("hello") - 1, sizeof("hello") - 1,
'h', 'e', 'l', 'l', 'o' 'h', 'e', 'l', 'l', 'o'
}; };
Foo__TestRequiredFieldsHashing128 *msg; Foo__TestRequiredFieldsBitmap *msg;
msg = foo__test_required_fields_hashing128__unpack(NULL, sizeof(source), source); msg = foo__test_required_fields_bitmap__unpack(NULL, sizeof(source), source);
assert (msg == NULL); assert (msg == NULL);
} }
...@@ -1717,7 +1717,7 @@ static Test tests[] = ...@@ -1717,7 +1717,7 @@ static Test tests[] =
{ "test free unpacked", test_alloc_free_all }, { "test free unpacked", test_alloc_free_all },
{ "test alloc failure", test_alloc_fail }, { "test alloc failure", test_alloc_fail },
{ "test required_fields_bitmap 128-bit hashing", test_required_fields_bitmap_hashing }, { "test required_fields_bitmap", test_required_fields_bitmap },
}; };
#define n_tests (sizeof(tests)/sizeof(Test)) #define n_tests (sizeof(tests)/sizeof(Test))
......
...@@ -222,7 +222,7 @@ message AllocValues { ...@@ -222,7 +222,7 @@ message AllocValues {
required DefaultRequiredValues a_mess = 5; required DefaultRequiredValues a_mess = 5;
} }
message TestRequiredFieldsHashing128 { message TestRequiredFieldsBitmap {
required string field1 = 1; required string field1 = 1;
optional string field2 = 2; optional string field2 = 2;
optional string field3 = 3; optional string field3 = 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment