]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test/encoding: verify that e.what() starts with expected str 47295/head
authorKefu Chai <tchaikov@gmail.com>
Fri, 22 Jul 2022 12:54:43 +0000 (20:54 +0800)
committerTim Serong <tserong@suse.com>
Wed, 27 Jul 2022 11:50:10 +0000 (21:50 +1000)
commit13dc077cf6c65a3b8c4f13d896847b9964b3fcbb
tree4fc8cca2cb5dc6fb1d402f719383cdbfe5c2c998
parent2abcbe4e47705e6e0fcc7d9d9b75625f563199af
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