-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
# Error: Test ppx_protobuf:0:Test wire format:2:test_overflow (in the log).
#
# File "src_test/test_wire.ml", line 92, characters 1-1:
# Error: Test ppx_protobuf:0:Test wire format:2:test_overflow (in the code).
#
# expected exception Protobuf.Decoder.Failure(Overflow("")), but no exception was raised.
# ------------------------------------------------------------------------------
# Ran: 31 tests in: 0.16 seconds.
# FAILED: Cases: 31 Tried: 31 Errors: 1 Failures: 1 Skip: 0 Todo: 0 Timeouts: 0.
Why
let test_overflow ctxt =
if Sys.word_size = 32 then
assert_raises Decoder.(Failure (Overflow ""))
(fun () -> Decoder.int_of_int32 "" 0xffffffffl)
elseshould overflow? 0xffffffffl = -1 on 32 bit systems - perfectly fits to int
Metadata
Metadata
Assignees
Labels
No labels