mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-19 19:52:15 +02:00
dde1574596
This is the result after running 'clang-format -i' on all C++ files and headers, with the defined formatting rules in .clang-format. Only the openvpn/common/unicode-impl.hpp has been excluded, as that is mostly a copy of an external project. Signed-off-by: David Sommerseth <davids@openvpn.net>
24 lines
569 B
C++
24 lines
569 B
C++
#include "test_common.h"
|
|
#include <iostream>
|
|
#include <memory>
|
|
|
|
#include <openvpn/common/size.hpp>
|
|
#include <openvpn/common/exception.hpp>
|
|
|
|
#include <openvpn/common/cleanup.hpp>
|
|
|
|
using namespace openvpn;
|
|
|
|
TEST(misc, cleanup)
|
|
{
|
|
|
|
bool ran_cleanup = false;
|
|
{
|
|
auto c = Cleanup([&]()
|
|
{ ran_cleanup = true; });
|
|
static_assert(std::is_nothrow_move_constructible<decltype(c)>::value,
|
|
"Cleanup should be noexcept MoveConstructible");
|
|
}
|
|
ASSERT_TRUE(ran_cleanup) << "cleanup didn't run as expected";
|
|
}
|