Commit 1c33db94 authored by Eric Blake's avatar Eric Blake
Browse files

ocaml: More idiomatic use of assert in tests

It is bad form to use an expression with side effects inside an
assert, as the exprssion remains untested if compiled with -noassert.
While the language documents[1] that it special-cases 'assert false'
to 'raise (Assert_failure ...)', it is not obvious whether this
syntactic sugar also occurs for 'assert (false)'.  And in general,
avoiding spurious () when an expression must be bool is useful.

[1] https://v2.ocaml.org/manual/expr.html
parent fcd90956
Pipeline #627703763 failed with stage
in 13 minutes and 8 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment