]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
test/encoding: verify that e.what() starts with expected str
authorKefu Chai <tchaikov@gmail.com>
Fri, 22 Jul 2022 12:54:43 +0000 (20:54 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 22 Jul 2022 16:14:35 +0000 (00:14 +0800)
commit0d9eec3c4feff30ab55601533bccf9ba6e568b9f
treec00fa9401332f4885c66ba62d3a296ff07d467fc
parent1a09e520bf26f61cb048d9d3d3876f284af64b04
test/encoding: verify that e.what() starts with expected str

boost changes the way how it prints boost::system::system_error in
boost 1.79 -- it appends the stringified error_category at end of
exception::what(), and our buffer::malformed_input is a subclass
of boost::system::system_error.

so we cannot just compare the return value of what() with the
expected string, to be more future proof, let's check if i
starts with the expected string instead.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/test/encoding.cc