Import of the watch repository from Pebble

This commit is contained in:
Matthieu Jeanson
2024-12-12 16:43:03 -08:00
committed by Katharine Berry
commit 3b92768480
10334 changed files with 2564465 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
# Regression test for #611:
# Enum messages inside OneOf generated as ENUM instead of UENUM
Import("env")
env.NanopbProto("uenum.proto")
env.Match(["uenum.pb.h", "uenum.expected"])
env.Object("uenum.pb.c")

View File

@@ -0,0 +1,5 @@
STATIC.* ONEOF.* ENUM.*MyEnum
STATIC.* ONEOF.* UENUM.*MyUEnum
! [^U]ENUM.*MyUEnum
! UENUM.*MyEnum

View File

@@ -0,0 +1,28 @@
syntax = "proto2";
enum my_enum {
E0 = 0;
E240 = 240;
E1 = -1;
}
enum my_uenum {
U0 = 0;
U240 = 240;
}
message my_message_regular {
required my_enum MyEnum = 1;
required my_uenum MyUEnum = 2;
}
message my_message_oneof {
required uint32 Data1 = 1;
oneof Data {
bool null = 2;
my_enum MyEnum = 3;
my_uenum MyUEnum = 4;
}
}