From debfc795b25094e3cd1f2f18bfcda27e2e804cfd Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Wed, 18 Jul 2018 12:05:13 +0200 Subject: [PATCH] tests: flat_mutation_reader: Use fluent assertions for better error messages Message-Id: <1531908313-29810-2-git-send-email-tgrabiec@scylladb.com> (cherry picked from commit dc453d4f5dfb283a5615f4b2806b16ccd2c9bc56) --- tests/flat_mutation_reader_test.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/flat_mutation_reader_test.cc b/tests/flat_mutation_reader_test.cc index f24196207f..5cf46b4247 100644 --- a/tests/flat_mutation_reader_test.cc +++ b/tests/flat_mutation_reader_test.cc @@ -108,14 +108,10 @@ SEASTAR_TEST_CASE(test_flat_mutation_reader_consume_single_partition) { BOOST_REQUIRE_EQUAL(1, result._consume_new_partition_call_count); BOOST_REQUIRE_EQUAL(1, result._consume_end_of_partition_call_count); BOOST_REQUIRE_EQUAL(m.partition().partition_tombstone() ? 1 : 0, result._consume_tombstone_call_count); - auto r2 = flat_mutation_reader_from_mutations({m}); - auto start = r2().get0(); - BOOST_REQUIRE(start); - BOOST_REQUIRE(start->is_partition_start()); + auto r2 = assert_that(flat_mutation_reader_from_mutations({m})); + r2.produces_partition_start(m.decorated_key(), m.partition().partition_tombstone()); for (auto& mf : result._fragments) { - auto mfopt = r2().get0(); - BOOST_REQUIRE(mfopt); - BOOST_REQUIRE(mf.equal(*m.schema(), *mfopt)); + r2.produces(*m.schema(), mf); } } });