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,14 @@
# Regression test for #453:
# Warning for float conversion with default values.
Import("env")
env2 = env.Clone()
if 'gcc' in env['CC']:
env2.Append(CFLAGS = '-Wconversion')
env2.NanopbProto("test.proto")
testprog = env2.Program(["test.c"])
env2.RunTest(testprog)
+11
View File
@@ -0,0 +1,11 @@
#include "test.pb.h"
#include "unittests.h"
int main()
{
int status = 0;
MyMessage msg = MyMessage_init_default;
TEST(msg.myfield >= 1.23399f);
TEST(msg.myfield <= 1.23401f);
return status;
}
@@ -0,0 +1,7 @@
syntax = 'proto2';
message MyMessage
{
optional float myfield = 1 [default = 1.234];
}