mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-30 17:01:19 +01:00
tests/pkg/nanopb: cover recent google protobuf changes
- update test in tests/pkg/nanopb to detect recent google.protobuf changes - test still runs with google.protobuf 4.21.12 - test now fails with google.protobuf 6.31.1 due to removal of deprecated api parts
This commit is contained in:
parent
82ef55f315
commit
10b93d45ed
@ -68,7 +68,7 @@ int main(void)
|
||||
pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer));
|
||||
|
||||
/* Fill in the lucky number */
|
||||
message.lucky_number = 13;
|
||||
message.number = SimpleMessage_Enum_lucky;
|
||||
|
||||
/* Now we are ready to encode the message! */
|
||||
status = pb_encode(&stream, SimpleMessage_fields, &message);
|
||||
@ -106,7 +106,7 @@ int main(void)
|
||||
}
|
||||
|
||||
/* Print the data contained in the message. */
|
||||
printf("Your lucky number was %d!\n", (int)message.lucky_number);
|
||||
printf("Your lucky number was %d!\n", (int)message.number);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -2,8 +2,11 @@
|
||||
// one message.
|
||||
|
||||
syntax = "proto2";
|
||||
import "nanopb.proto";
|
||||
|
||||
message SimpleMessage {
|
||||
required int32 lucky_number = 1;
|
||||
enum Enum {
|
||||
lucky = 13;
|
||||
};
|
||||
|
||||
optional Enum number = 1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user