Import of the watch repository from Pebble

This commit is contained in:
Matthieu Jeanson
2025-01-27 11:38:16 -08:00
committed by Katharine Berry
commit 3b92768480
10334 changed files with 2564465 additions and 0 deletions
@@ -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;
}
+5
View File
@@ -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"