-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Float/Int mismatch #93
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
mefellows
added
bug
Indicates an unexpected problem or unintended behavior
triage
labels
Jul 31, 2018
Ah, I can see the problem. Patch incoming in latest beta... |
mefellows
added a commit
that referenced
this issue
Jul 31, 2018
Thanks for the report @alexplischke, this should be fixed in the latest v1.0.0-beta.2. |
Thanks for the quick fix! |
No worries - I'm backporting to the |
mefellows
added a commit
that referenced
this issue
Jul 31, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Software versions
go1.10.2 darwin/amd64
GOARCH="amd64" GOBIN="" GOCACHE="/Users/alexplischke/Library/Caches/go-build" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/alexplischke/go" GORACE="" GOROOT="/usr/local/Cellar/go/1.10.2/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/qh/nfnj30bn06z5rgb84b0nlb280000gn/T/go-build420646863=/tmp/go-build -gno-record-gcc-switches -fno-common"
Expected behaviour
I have a struct with a field "foo" of type
float64
. Pact generates a contract with the following statement"foo": 1.0
.Actual behaviour
Pact generates a contract with the following statement
"foo": 1
. This causes the verification to fail, when the actual response is a float and not as pact generated, an int.Steps to reproduce
Create a struct with a float64 (or float32) field and match the struct via
Body: dsl.Match(&YourStruct{})
.Relevant log lines
The text was updated successfully, but these errors were encountered: