mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-03 16:56:45 +00:00
14 lines
318 B
C++
14 lines
318 B
C++
#include "util/ScopeGuard.hpp"
|
|
|
|
#include <gmock/gmock.h>
|
|
#include <gtest/gtest.h>
|
|
|
|
TEST(ScopeGuardTest, IsCalled)
|
|
{
|
|
testing::StrictMock<testing::MockFunction<void()>> mockFunction;
|
|
EXPECT_CALL(mockFunction, Call());
|
|
{
|
|
util::ScopeGuard const guard([&mockFunction] { mockFunction.Call(); });
|
|
}
|
|
}
|