aboutsummaryrefslogtreecommitdiffstats
path: root/test/rspamd_cxx_unit_utils.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'test/rspamd_cxx_unit_utils.hxx')
-rw-r--r--test/rspamd_cxx_unit_utils.hxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/rspamd_cxx_unit_utils.hxx b/test/rspamd_cxx_unit_utils.hxx
index f5c532ff5..0cd229a4f 100644
--- a/test/rspamd_cxx_unit_utils.hxx
+++ b/test/rspamd_cxx_unit_utils.hxx
@@ -42,11 +42,13 @@ TEST_CASE("rspamd_strip_smtp_comments_inplace") {
};
for (const auto &c : cases) {
- auto *cpy = new char[c.first.size()];
- memcpy(cpy, c.first.data(), c.first.size());
- auto nlen = rspamd_strip_smtp_comments_inplace(cpy, c.first.size());
- CHECK(std::string{cpy,nlen} == c.second);
- delete[] cpy;
+ SUBCASE (("strip comments in " + c.first).c_str()) {
+ auto *cpy = new char[c.first.size()];
+ memcpy(cpy, c.first.data(), c.first.size());
+ auto nlen = rspamd_strip_smtp_comments_inplace(cpy, c.first.size());
+ CHECK(std::string{cpy, nlen} == c.second);
+ delete[] cpy;
+ }
}
}