mirror of
https://github.com/google/pebble
synced 2026-10-18 01:04:12 +02:00
Import of the watch repository from Pebble
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Regression test for #637:
|
||||
# Generator produces incorrect output when a oneof is used
|
||||
|
||||
Import("env")
|
||||
|
||||
env.NanopbProto("other.proto")
|
||||
env.NanopbProto(["oneof.proto", "other.proto"])
|
||||
env.Object("oneof.pb.c")
|
||||
env.Object("test.c")
|
||||
@@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
|
||||
import "other.proto";
|
||||
|
||||
message FirstOneof {}
|
||||
|
||||
message Bar {
|
||||
oneof content {
|
||||
FirstOneof first = 1;
|
||||
SecondOneof second = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message Foo {
|
||||
Bar bar = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message SecondOneof {
|
||||
repeated int32 foo = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
/* This fakes the situation where other.proto is not found for some reason
|
||||
* by making its size indefinite, but then defining it here manually. */
|
||||
|
||||
#define SecondOneof_size 5
|
||||
#include "oneof.pb.h"
|
||||
Reference in New Issue
Block a user