More features, refactoring
This commit is contained in:
3
betterproto/tests/double-negative.json
Normal file
3
betterproto/tests/double-negative.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"count": -123.45
|
||||
}
|
||||
3
betterproto/tests/double.json
Normal file
3
betterproto/tests/double.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"count": 123.45
|
||||
}
|
||||
5
betterproto/tests/double.proto
Normal file
5
betterproto/tests/double.proto
Normal file
@@ -0,0 +1,5 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message Test {
|
||||
double count = 1;
|
||||
}
|
||||
3
betterproto/tests/enums.json
Normal file
3
betterproto/tests/enums.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"greeting": 1
|
||||
}
|
||||
14
betterproto/tests/enums.proto
Normal file
14
betterproto/tests/enums.proto
Normal file
@@ -0,0 +1,14 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// Enum for the different greeting types
|
||||
enum Greeting {
|
||||
HI = 0;
|
||||
HEY = 1;
|
||||
// Formal greeting
|
||||
HELLO = 2;
|
||||
}
|
||||
|
||||
message Test {
|
||||
// Greeting enum example
|
||||
Greeting greeting = 1;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"counts": [1, 2, -1, -2]
|
||||
"counts": [1, 2, -1, -2],
|
||||
"signed": [1, 2, -1, -2],
|
||||
"fixed": [1.0, 2.7, 3.4]
|
||||
}
|
||||
|
||||
@@ -2,4 +2,6 @@ syntax = "proto3";
|
||||
|
||||
message Test {
|
||||
repeated int32 counts = 1;
|
||||
repeated sint64 signed = 2;
|
||||
repeated double fixed = 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user