]> 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)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 8 Sep 2022 11:14:08 +0000 (13:14 +0200)
commit78e3715d57e9992e58b2749c316a8d441534040d
tree6ec32d1bf13c72d6a8c49951e001a4a6b4896901
parent8589bc0d40856ab338b3c8e02e7a29637fa42fbc
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>
(cherry picked from commit 0d9eec3c4feff30ab55601533bccf9ba6e568b9f)
src/test/encoding.cc