Files
nanopb/tests/options.proto
Petteri Aimonen 0ee4bb96b1 Allow defining field type in .proto.
Update issue 30
Status: FixedInGit
2012-10-29 18:34:24 +02:00

34 lines
597 B
Protocol Buffer

/* Test nanopb option parsing.
* options.expected lists the patterns that are searched for in the output.
*/
import "nanopb.proto";
// File level options
option (nanopb_fileopt).max_size = 20;
message Message1
{
required string filesize = 1;
}
// Message level options
message Message2
{
option (nanopb_msgopt).max_size = 30;
required string msgsize = 1;
}
// Field level options
message Message3
{
required string fieldsize = 1 [(nanopb).max_size = 40];
}
// Forced callback field
message Message4
{
required int32 int32_callback = 1 [(nanopb).type = FT_CALLBACK];
}