From 0a1787b03368d05ace520e45e8a081bed9a48553 Mon Sep 17 00:00:00 2001 From: dsavvinov Date: Mon, 8 Aug 2016 14:17:15 +0300 Subject: [PATCH] Protobuf: synchronized test set for protoc with carkot protobufs and changed problematic fields (like double/string) to more convenient int32 --- .../compiler/kotlin/test/connect.proto | 4 +-- .../compiler/kotlin/test/direction.proto | 2 +- .../compiler/kotlin/test/location.proto | 8 ++--- .../compiler/kotlin/test/rc_session.proto | 30 +++++++++++++++++++ .../protobuf/compiler/kotlin/test/route.proto | 6 ++-- .../compiler/kotlin/test/route_done.proto | 2 +- 6 files changed, 41 insertions(+), 11 deletions(-) create mode 100644 proto/compiler/google/src/google/protobuf/compiler/kotlin/test/rc_session.proto diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/connect.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/connect.proto index 49df5b9aaa9..36c6410ace1 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/connect.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/connect.proto @@ -5,13 +5,13 @@ option java_package = "proto.car"; option java_outer_classname = "Connect"; message ConnectionRequest { - string ip = 1; + int32 ip = 1; int32 port = 2; } message ConnectionResponse { int32 uid = 1; int32 code = 2; - string errorMsg = 3; + int32 errorMsg = 3; } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/direction.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/direction.proto index ca614a16ea6..764d70cbf95 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/direction.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/direction.proto @@ -17,5 +17,5 @@ message DirectionRequest { message DirectionResponse { int32 code = 1; - string errorMsg = 2; + int32 errorMsg = 2; } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/location.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/location.proto index 0d477c8217e..25cef8393a8 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/location.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/location.proto @@ -8,11 +8,11 @@ message LocationResponse { LocationData locationResponseData = 1; int32 code = 2; - string errorMsg = 3; + int32 errorMsg = 3; message LocationData { - double x = 1; - double y = 2; - double angle = 3; + int32 x = 1; + int32 y = 2; + int32 angle = 3; } } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/rc_session.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/rc_session.proto new file mode 100644 index 00000000000..89adb0dd962 --- /dev/null +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/rc_session.proto @@ -0,0 +1,30 @@ +syntax = "proto3"; +package carkot; + +option java_package = "proto.car"; +option java_outer_classname = "RcSession"; + +//session up request is empty. only URL +message SessionUpResponse { + int32 code = 1; + int32 errorMsg = 2; + int32 sid = 3; +} + +message SessionDownResponse { + int32 code = 1; + int32 errorMsg = 2; +} + +message SessionDownRequest { + int32 sid = 1; +} + +message HeartBeatRequest { + int32 sid = 1; +} + +message HeartBeatResponse { + int32 code = 1; + int32 errorMsg = 2; +} diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route.proto index 864845be2f0..7875fa2ce36 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route.proto @@ -8,12 +8,12 @@ message RouteRequest { repeated WayPoint way_points = 1; message WayPoint { - double distance = 2; - double angle_delta = 3; + int32 distance = 2; + int32 angle_delta = 3; } } message RouteResponse { int32 code = 1; - string errorMsg = 2; + int32 errorMsg = 2; } diff --git a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route_done.proto b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route_done.proto index 5fe75d274f2..3a935db9ad7 100644 --- a/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route_done.proto +++ b/proto/compiler/google/src/google/protobuf/compiler/kotlin/test/route_done.proto @@ -6,5 +6,5 @@ option java_outer_classname = "RouteDone"; message RouteDoneResponse { int32 code = 1; - string errorMsg = 2; + int32 errorMsg = 2; }