瀏覽代碼

Formatting.

main
offa 7 年之前
父節點
當前提交
7ea1aa7439
共有 1 個檔案被更改,包括 8 行新增7 行删除
  1. +8
    -7
      test/UniqueResourceTest.cpp

+ 8
- 7
test/UniqueResourceTest.cpp 查看文件

@@ -38,7 +38,9 @@ namespace

struct ThrowOnCopyMock
{
ThrowOnCopyMock() { }
ThrowOnCopyMock()
{
}

ThrowOnCopyMock(const ThrowOnCopyMock&) noexcept(false)
{
@@ -47,7 +49,6 @@ namespace

ThrowOnCopyMock(ThrowOnCopyMock&&) = delete;

MAKE_CONST_MOCK1(deleter, void(ThrowOnCopyMock));

ThrowOnCopyMock& operator=(const ThrowOnCopyMock&) noexcept(false)
{
@@ -60,20 +61,20 @@ namespace

struct NotNothrowMoveMock
{
NotNothrowMoveMock(CallMock* mo) : m_mock(mo) { }
NotNothrowMoveMock(CallMock* mo) : m_mock(mo)
{
}

NotNothrowMoveMock(const NotNothrowMoveMock& other) : m_mock(other.m_mock)
{
throw std::exception{};
}

NotNothrowMoveMock(NotNothrowMoveMock&& other) noexcept(false) : m_mock(other.m_mock) { }

void operator()(Handle h) const
NotNothrowMoveMock(NotNothrowMoveMock&& other) noexcept(false) : m_mock(other.m_mock)
{
m_mock->deleter(h);
}


NotNothrowMoveMock& operator=(const NotNothrowMoveMock&)
{
throw "Not implemented";

Loading…
取消
儲存