summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorSergey Levchenko (GitHub) <slevchenko.work@gmail.com>2017-04-21 11:30:38 +0300
committerSergey Levchenko (GitHub) <slevchenko.work@gmail.com>2017-04-21 11:30:38 +0300
commit5a14774fee91b6b42bcd368747eb756886a3b48b (patch)
treecdd9e203ab684ca1ff682f5367d1fd5689097a05 /src/components
parent47df5db07a9de4f81f6ed82fc04fca55ad2e018c (diff)
downloadsdl_core-5a14774fee91b6b42bcd368747eb756886a3b48b.tar.gz
Fix coding style
Diffstat (limited to 'src/components')
-rw-r--r--src/components/application_manager/src/hmi_capabilities_impl.cc20
-rw-r--r--src/components/application_manager/src/message_helper/message_helper.cc3
-rw-r--r--src/components/application_manager/test/resumption/resume_ctrl_test.cc3
-rw-r--r--src/components/policy/policy_regular/include/policy/pt_representation.h1
-rw-r--r--src/components/policy/policy_regular/src/policy_manager_impl.cc3
-rw-r--r--src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h4
-rw-r--r--src/components/policy/policy_regular/test/policy_manager_impl_test.cc1
-rw-r--r--src/components/protocol_handler/test/protocol_handler_tm_test.cc77
8 files changed, 69 insertions, 43 deletions
diff --git a/src/components/application_manager/src/hmi_capabilities_impl.cc b/src/components/application_manager/src/hmi_capabilities_impl.cc
index b78060a7d5..9d52cc98db 100644
--- a/src/components/application_manager/src/hmi_capabilities_impl.cc
+++ b/src/components/application_manager/src/hmi_capabilities_impl.cc
@@ -75,14 +75,18 @@ void InitCapabilities() {
tts_enum_capabilities.insert(std::make_pair(
std::string("TEXT"), hmi_apis::Common_SpeechCapabilities::SC_TEXT));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("SAPI_PHONEMES"), hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("LHPLUS_PHONEMES"), hmi_apis::Common_SpeechCapabilities::LHPLUS_PHONEMES));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("SAPI_PHONEMES"), hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
- tts_enum_capabilities.insert(std::make_pair(
- std::string("PRE_RECORDED"), hmi_apis::Common_SpeechCapabilities::PRE_RECORDED));
+ tts_enum_capabilities.insert(
+ std::make_pair(std::string("SAPI_PHONEMES"),
+ hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
+ tts_enum_capabilities.insert(
+ std::make_pair(std::string("LHPLUS_PHONEMES"),
+ hmi_apis::Common_SpeechCapabilities::LHPLUS_PHONEMES));
+ tts_enum_capabilities.insert(
+ std::make_pair(std::string("SAPI_PHONEMES"),
+ hmi_apis::Common_SpeechCapabilities::SAPI_PHONEMES));
+ tts_enum_capabilities.insert(
+ std::make_pair(std::string("PRE_RECORDED"),
+ hmi_apis::Common_SpeechCapabilities::PRE_RECORDED));
tts_enum_capabilities.insert(std::make_pair(
std::string("SILENCE"), hmi_apis::Common_SpeechCapabilities::SILENCE));
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc
index bdae1459a8..c0567b75f0 100644
--- a/src/components/application_manager/src/message_helper/message_helper.cc
+++ b/src/components/application_manager/src/message_helper/message_helper.cc
@@ -387,7 +387,8 @@ mobile_apis::HMILevel::eType MessageHelper::StringToHMILevel(
return mobile_apis::HMILevel::INVALID_ENUM;
}
-std::string MessageHelper::StringifiedHMILevel(const mobile_apis::HMILevel::eType hmi_level) {
+std::string MessageHelper::StringifiedHMILevel(
+ const mobile_apis::HMILevel::eType hmi_level) {
using namespace NsSmartDeviceLink::NsSmartObjects;
const char* str = 0;
if (EnumConversionHelper<mobile_apis::HMILevel::eType>::EnumToCString(
diff --git a/src/components/application_manager/test/resumption/resume_ctrl_test.cc b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
index 386e81d4ba..f80842e250 100644
--- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc
+++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc
@@ -655,7 +655,8 @@ TEST_F(ResumeCtrlTest, SetAppHMIState_HMINone_WithoutCheckPolicy) {
EXPECT_CALL(*app_mock_, set_is_resuming(true));
EXPECT_CALL(state_controller_, SetRegularState(_, kDefaultTestLevel_))
.Times(AtLeast(1));
- const bool res = res_ctrl_->SetAppHMIState(app_mock_, kDefaultTestLevel_, false);
+ const bool res =
+ res_ctrl_->SetAppHMIState(app_mock_, kDefaultTestLevel_, false);
EXPECT_TRUE(res);
}
diff --git a/src/components/policy/policy_regular/include/policy/pt_representation.h b/src/components/policy/policy_regular/include/policy/pt_representation.h
index eff76233ef..08bd6d4923 100644
--- a/src/components/policy/policy_regular/include/policy/pt_representation.h
+++ b/src/components/policy/policy_regular/include/policy/pt_representation.h
@@ -39,7 +39,6 @@
#include "policy/policy_table/types.h"
#include "policy/policy_settings.h"
-
namespace policy {
namespace policy_table = rpc::policy_table_interface_base;
diff --git a/src/components/policy/policy_regular/src/policy_manager_impl.cc b/src/components/policy/policy_regular/src/policy_manager_impl.cc
index 3a4e9d6acb..8c3fbe5178 100644
--- a/src/components/policy/policy_regular/src/policy_manager_impl.cc
+++ b/src/components/policy/policy_regular/src/policy_manager_impl.cc
@@ -314,7 +314,8 @@ void PolicyManagerImpl::StartPTExchange() {
if (RequestPTUpdate() && !timer_retry_sequence_.is_running()) {
// Start retry sequency
const int timeout_sec = NextRetryTimeout();
- LOG4CXX_DEBUG(logger_, "Start retry sequence timeout = " << timeout_sec);
+ LOG4CXX_DEBUG(logger_,
+ "Start retry sequence timeout = " << timeout_sec);
timer_retry_sequence_.Start(timeout_sec, timer::kPeriodic);
}
}
diff --git a/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h b/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
index d537ef15f1..faabfe56be 100644
--- a/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
+++ b/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
@@ -39,14 +39,12 @@
#include "policy/cache_manager_interface.h"
-
namespace test {
namespace components {
namespace policy_test {
namespace policy_table = rpc::policy_table_interface_base;
using namespace ::policy;
-
class MockCacheManagerInterface : public CacheManagerInterface {
public:
MOCK_METHOD4(CheckPermissions,
@@ -71,7 +69,7 @@ class MockCacheManagerInterface : public CacheManagerInterface {
const std::vector<std::string>& msg_codes,
const std::string& language));
- MOCK_METHOD1(
+ MOCK_METHOD1(
GetNotificationsNumber,
policy_table::NumberOfNotificationsType(const std::string& priority));
MOCK_CONST_METHOD2(GetPriority,
diff --git a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
index 97217a1ee7..029606604d 100644
--- a/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
+++ b/src/components/policy/policy_regular/test/policy_manager_impl_test.cc
@@ -66,7 +66,6 @@ using ::testing::Return;
using ::policy::PolicyManagerImpl;
using ::policy::PolicyTable;
-
namespace test {
namespace components {
namespace policy_test {
diff --git a/src/components/protocol_handler/test/protocol_handler_tm_test.cc b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
index 79c6aa9223..1d174c0253 100644
--- a/src/components/protocol_handler/test/protocol_handler_tm_test.cc
+++ b/src/components/protocol_handler/test/protocol_handler_tm_test.cc
@@ -176,7 +176,8 @@ class ProtocolHandlerImplTest : public ::testing::Test {
connection_id);
}
- void AddSession(const ::utils::SharedPtr<TestAsyncWaiter>& waiter, uint32_t& times) {
+ void AddSession(const ::utils::SharedPtr<TestAsyncWaiter>& waiter,
+ uint32_t& times) {
ASSERT_TRUE(NULL != waiter.get());
AddConnection();
@@ -205,8 +206,8 @@ class ProtocolHandlerImplTest : public ::testing::Test {
// Expect send Ack with PROTECTION_OFF (on no Security Manager)
EXPECT_CALL(transport_manager_mock,
- SendMessageToDevice(ControlMessage(
- FRAME_DATA_START_SERVICE_ACK, PROTECTION_OFF)))
+ SendMessageToDevice(ControlMessage(FRAME_DATA_START_SERVICE_ACK,
+ PROTECTION_OFF)))
.WillOnce(DoAll(NotifyTestAsyncWaiter(waiter), Return(E_SUCCESS)));
times++;
@@ -480,12 +481,12 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverAccept) {
SetProtocolVersion2();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
-
EXPECT_TRUE(waiter->WaitFor(times, kAsyncExpectationsTimeout));
}
// TODO(EZamakhov): add test for get_hash_id/set_hash_id from
@@ -494,7 +495,8 @@ TEST_F(ProtocolHandlerImplTest, StartSession_Protected_SessionObserverAccept) {
* ProtocolHandler shall send NAck on session_observer rejection
*/
TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -527,7 +529,8 @@ TEST_F(ProtocolHandlerImplTest, EndSession_SessionObserverReject) {
* ProtocolHandler shall send NAck on wrong hash code
*/
TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -562,7 +565,8 @@ TEST_F(ProtocolHandlerImplTest, EndSession_Success) {
* Check session_observer with PROTECTION_OFF and Ack with PROTECTION_OFF
*/
TEST_F(ProtocolHandlerImplTest, SecurityEnable_StartSessionProtocoloV1) {
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1066,7 +1070,8 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification) {
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1103,7 +1108,8 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_ThresholdValue) {
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1139,7 +1145,8 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_VideoFrameSkip) {
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1167,7 +1174,8 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerification_AudioFrameSkip) {
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1195,7 +1203,8 @@ TEST_F(ProtocolHandlerImplTest, DISABLED_FloodVerificationDisable) {
InitProtocolHandlerImpl(period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1223,7 +1232,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedVerificationDisable) {
InitProtocolHandlerImpl(0u, 0u, false, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1255,7 +1265,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1301,7 +1312,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedStock) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1372,7 +1384,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_MalformedOnly) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1432,7 +1445,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullTimePeriod) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1465,7 +1479,8 @@ TEST_F(ProtocolHandlerImplTest, MalformedLimitVerification_NullCount) {
InitProtocolHandlerImpl(0u, 0u, true, period_msec, max_messages);
AddConnection();
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1507,7 +1522,8 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, SendEndServicePrivate_EndSession_MessageSent) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1531,7 +1547,8 @@ TEST_F(ProtocolHandlerImplTest, SendEndServicePrivate_EndSession_MessageSent) {
TEST_F(ProtocolHandlerImplTest,
SendEndServicePrivate_ServiceTypeControl_MessageSent) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1569,7 +1586,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_NoConnection_NotSent) {
TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1593,7 +1611,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeat_Successful) {
TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_Successful) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1621,7 +1640,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_Successful) {
TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_WrongProtocolVersion_NotSent) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1650,7 +1670,8 @@ TEST_F(ProtocolHandlerImplTest, SendHeartBeatAck_WrongProtocolVersion_NotSent) {
TEST_F(ProtocolHandlerImplTest,
SendMessageToMobileApp_SendSingleControlMessage) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1687,7 +1708,8 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest,
SendMessageToMobileApp_SendSingleNonControlMessage) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);
@@ -1729,7 +1751,8 @@ TEST_F(ProtocolHandlerImplTest,
TEST_F(ProtocolHandlerImplTest, SendMessageToMobileApp_SendMultiframeMessage) {
// Arrange
- ::utils::SharedPtr<TestAsyncWaiter> waiter = utils::MakeShared<TestAsyncWaiter>();
+ ::utils::SharedPtr<TestAsyncWaiter> waiter =
+ utils::MakeShared<TestAsyncWaiter>();
uint32_t times = 0;
AddSession(waiter, times);