Skip to content

Commit

Permalink
add intgrtest uint64/int64
Browse files Browse the repository at this point in the history
  • Loading branch information
rez1dent3 committed Sep 2, 2023
1 parent 9d76e9f commit 842e00e
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 15 deletions.
9 changes: 9 additions & 0 deletions example/simple/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,13 @@ func main() {
}

log.Printf("Greeting error: %s, code: %d", err, s.Code())

r, err = c.SayHello(context.Background(), &pb.Request{Vint64: 72057594037927936, Vuint64: 18446744073709551615})
if err != nil {
log.Fatalf("error from grpc: %v", err)
}
if r.Message != "72057594037927936 18446744073709551615" {
log.Fatalf("failed to get valid message: %v", r.Message)
}
log.Printf("Greeting: %s (return code %d)", r.Message, r.ReturnCode)
}
2 changes: 2 additions & 0 deletions example/simple/simple.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ service Gripmock {
// The request message containing the user's name.
message Request {
string name = 1;
int64 vint64 = 2;
uint64 vuint64 = 3;
}

// The response message containing the greetings
Expand Down
12 changes: 12 additions & 0 deletions example/simple/stub/uint64_int64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
- service: Gripmock
method: SayHello
input:
equals:
# {"high":72057594037927936,"low":0}
vint64: 72057594037927936
# {"high":18446744073709551615,"low":18446744073709551615}
vuint64: 18446744073709551615
output:
data:
message: "72057594037927936 18446744073709551615"
48 changes: 33 additions & 15 deletions protogen/example/simple/simple.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 842e00e

Please sign in to comment.