From 4b6255c24646ee19667c7b07bd3d8eeafdaca610 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 2 Dec 2022 15:14:49 +0800 Subject: [PATCH] tests: spawn_test: use BOOST_CHECK_EQUAL() for checking equality of temporary_buffer so we can have better understanding of failures, if this test fails. Signed-off-by: Kefu Chai Closes #1327 --- tests/unit/spawn_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/spawn_test.cc b/tests/unit/spawn_test.cc index 3e27464d9b5..e50fc8d473f 100644 --- a/tests/unit/spawn_test.cc +++ b/tests/unit/spawn_test.cc @@ -100,7 +100,7 @@ SEASTAR_TEST_CASE(test_spawn_input) { }).then([&stdout] { return stdout.read_exactly(text.size()); }).then([] (temporary_buffer echo) { - BOOST_CHECK(echo == echo.copy_of(text)); + BOOST_CHECK_EQUAL(sstring(echo.get(), echo.size()), text); }).finally([&p] { return p.wait().discard_result(); });