Commit 0a8ab78e authored by Dominik Charousset's avatar Dominik Charousset

Fix UB in unit tests from messed up fixtures

parent 11298e99
......@@ -28,6 +28,8 @@
using namespace std;
using namespace caf;
namespace {
template <class... Ts>
void print(const char* format, Ts... xs) {
char buf[200];
......@@ -69,6 +71,8 @@ struct fixture {
}
};
} // namespace <anonymous>
CAF_TEST_FIXTURE_SCOPE(inbound_path_tests, fixture)
CAF_TEST(default_constructed) {
......
......@@ -28,21 +28,19 @@
using namespace caf;
using caf::io::network::receive_buffer;
struct fixture {
namespace {
receive_buffer a;
receive_buffer b;
std::vector<char> vec;
struct fixture {
receive_buffer a;
receive_buffer b;
std::vector<char> vec;
fixture()
: a{},
b{1024ul},
vec{'h', 'a', 'l', 'l', 'o'} {
fixture() : b(1024ul), vec{'h', 'a', 'l', 'l', 'o'} {
// nop
}
}
};
} // namespace <anonymous>
CAF_TEST_FIXTURE_SCOPE(receive_buffer_tests, fixture)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment