Add basic oneof tests
This commit is contained in:
parent
a33d92d89d
commit
cfedcab5ab
@ -222,6 +222,10 @@ $ pipenv run tests
|
|||||||
- [x] Refs to nested types
|
- [x] Refs to nested types
|
||||||
- [x] Imports in proto files
|
- [x] Imports in proto files
|
||||||
- [x] Well-known Google types
|
- [x] Well-known Google types
|
||||||
|
- [ ] OneOf support
|
||||||
|
- [x] Basic support on the wire
|
||||||
|
- [ ] Check which was set from the group
|
||||||
|
- [ ] Setting one unsets the others
|
||||||
- [ ] JSON that isn't completely naive.
|
- [ ] JSON that isn't completely naive.
|
||||||
- [x] 64-bit ints as strings
|
- [x] 64-bit ints as strings
|
||||||
- [x] Maps
|
- [x] Maps
|
||||||
|
3
betterproto/tests/oneof-name.json
Normal file
3
betterproto/tests/oneof-name.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"name": "foo"
|
||||||
|
}
|
3
betterproto/tests/oneof.json
Normal file
3
betterproto/tests/oneof.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"count": 1
|
||||||
|
}
|
8
betterproto/tests/oneof.proto
Normal file
8
betterproto/tests/oneof.proto
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
message Test {
|
||||||
|
oneof foo {
|
||||||
|
int32 count = 1;
|
||||||
|
string name = 2;
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user