diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-20 12:24:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-06-20 12:24:45 +0100 |
commit | 420725bcd0ce4f580e7aa98a0c7a6b3c8ff49e6d (patch) | |
tree | 1cf3dfbf27440c273774609a05bf0516b1d7c3b8 /test/rspamd_cxx_unit_utils.hxx | |
parent | 4395db507d29539c1b828813c0a7e3e2d09cdaa3 (diff) | |
download | rspamd-420725bcd0ce4f580e7aa98a0c7a6b3c8ff49e6d.tar.gz rspamd-420725bcd0ce4f580e7aa98a0c7a6b3c8ff49e6d.zip |
[Test] Rework some tests to subcases
Diffstat (limited to 'test/rspamd_cxx_unit_utils.hxx')
-rw-r--r-- | test/rspamd_cxx_unit_utils.hxx | 12 |
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; + } } } |