tests: avoid build warning

Check all the functions that return a Result.
This commit is contained in:
Dirk-Jan C. Binnema
2026-08-17 21:25:54 +03:00
committed by Seth Ladygo
parent d5a48e99f7
commit bdf2c8b6b1
6 changed files with 23 additions and 21 deletions

View File

@ -1043,7 +1043,7 @@ https://trac.xapian.org/ticket/719
MemDb mdb;
Config conf{mdb};
conf.set<Config::Id::NgramsEnabled>(true);
assert_valid_result(conf.set<Config::Id::NgramsEnabled>(true));
TempDir tdir;
auto store{make_test_store(tdir.path(), test_msgs, conf)};
@ -1113,11 +1113,13 @@ Boo!
g_assert_true(msg.sexp().to_string().find("shrike") == std::string::npos);
store.update_labels(msg, Labels::parse_delta_labels("+shrike"," ").value());
assert_valid_result(store.update_labels(
msg, Labels::parse_delta_labels("+shrike"," ").value()));
g_assert_true(msg.sexp().to_string().find("shrike") != std::string::npos);
store.update_labels(msg, Labels::parse_delta_labels("-shrike"," ").value());
assert_valid_result(store.update_labels(
msg, Labels::parse_delta_labels("-shrike"," ").value()));
g_assert_true(msg.sexp().to_string().find("shrike") == std::string::npos);
}