/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
assertStatus(DISCONNECTED);
}
-Client::~Client() noexcept(false)
+Client::~Client()
{
- bool oops = std::uncaught_exception();
try {
RUNNER_DEFER_SCOPE(cynara_async_finish(m_cynara););
assertStatus(DISCONNECTED);
} catch (...) {
- if (!oops)
- throw;
RUNNER_ERROR_MSG("Error: more exceptions thrown while releasing CynaraTestAsync::Client.");
}
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
};
Client(const StatusFunction &userFunction = StatusFunction());
- ~Client() noexcept(false);
+ ~Client();
void assertStatus(enum SocketStatus expectedStatus);
void checkCache(const CheckData &checkData, int expectedResult);
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace CynaraTestClientAsync {
-RequestMonitor::~RequestMonitor() noexcept(false)
+RequestMonitor::~RequestMonitor()
{
- bool oops = std::uncaught_exception();
try {
for (auto ent : m_requests)
{
- RUNNER_ERROR_MSG("There was no callback for request with:"
- << "id = " << ent.first << ","
- << "expectedResponse = " << ent.second.m_expectedResponse << ","
+ RUNNER_ERROR_MSG("There was no callback for request with: "
+ << "id = " << ent.first << ", "
+ << "expectedResponse = " << ent.second.m_expectedResponse << ", "
<< "expectedCause = " << ent.second.m_expectedCause << ".");
}
- RUNNER_ASSERT_MSG(m_requests.empty(),
- m_requests.size() << "requests does not receive callback.");
+ if (!m_requests.empty())
+ RUNNER_ERROR_MSG(m_requests.size() << " requests did not receive callback.");
} catch (...) {
- if (!oops)
- throw;
RUNNER_ERROR_MSG("Error: more exceptions thrown while releasing"
" CynaraTestAsync::RequestMonitor.");
}
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
class RequestMonitor
{
public:
- ~RequestMonitor() noexcept(false);
+ ~RequestMonitor();
void registerRequest(cynara_check_id id, const RequestEntity &request);
m_serviceManager.stopService();
}
-CynaraMask::~CynaraMask() noexcept(false)
+CynaraMask::~CynaraMask()
{
- bool oops = std::uncaught_exception();
try {
m_serviceManager.unmaskService();
m_serviceManager.startService();
} catch (...) {
- if (!oops)
- throw;
RUNNER_ERROR_MSG("Error: more exceptions thrown while releasing CynaraMask.");
}
}
{
public:
CynaraMask();
- ~CynaraMask() noexcept(false);
+ ~CynaraMask();
private:
ServiceManager m_serviceManager;
__FILE__, \
__LINE__, \
assertMsg.str()); \
- if (!std::uncaught_exception()) \
- throw e; \
- DPL::Test::TestRunnerSingleton::Instance().addFailReason(e.GetMessage()); \
+ throw e; \
} \
} while (0)
__FILE__, \
__LINE__, \
assertMsg.str()); \
- if (!std::uncaught_exception()) \
- throw e; \
- DPL::Test::TestRunnerSingleton::Instance().addFailReason(e.GetMessage()); \
+ throw e; \
} \
} while (0)
if (m_deferDeepness > 0)
return;
- bool oops = std::uncaught_exception();
- size_t additionalExceptions = oops ? 0 : 1;
- for (size_t i = additionalExceptions; i < m_deferredExceptionsMessages.size(); ++i)
+ for (size_t i = 0; i < m_deferredExceptionsMessages.size(); ++i) {
addFailReason(m_deferredExceptionsMessages[i]);
+ }
- if (!oops && !m_deferredExceptionsMessages.empty())
+ if (!m_deferredExceptionsMessages.empty())
{
m_deferredExceptionsMessages.clear();
switch (m_firstDeferredExceptionType) {
/*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
*/
/*
* @file security_server_tests_password.cpp
}
~SystemClock() {
- if (std::uncaught_exception()) {
- stime(&m_original);
- return;
- }
-
- RUNNER_ASSERT_ERRNO(0 == stime(&m_original));
+ if (stime(&m_original) != 0)
+ RUNNER_ERROR_MSG("Failed to set time. Error: " << strerror(errno));
}
private:
time_t m_original;