mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +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(); });
|
|
}
|
|
}
|