diff options
Diffstat (limited to 'src/components/application_manager/test')
4 files changed, 27 insertions, 27 deletions
diff --git a/src/components/application_manager/test/include/application_manager/mock_resumption_data.h b/src/components/application_manager/test/include/application_manager/mock_resumption_data.h index 7cabc12086..b99ce11619 100644 --- a/src/components/application_manager/test/include/application_manager/mock_resumption_data.h +++ b/src/components/application_manager/test/include/application_manager/mock_resumption_data.h @@ -78,7 +78,7 @@ class MockResumptionData : public ::resumption::ResumptionData { MOCK_METHOD2(RemoveApplicationFromSaved, bool(const std::string& policy_app_id, const std::string& device_id)); - MOCK_CONST_METHOD0(GetIgnOffTime, uint32_t()); + MOCK_CONST_METHOD0(GetIgnOffTime, int64_t()); MOCK_CONST_METHOD2(IsApplicationSaved, ssize_t(const std::string& policy_app_id, const std::string& device_id)); 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 010cd0bf05..058be224a7 100644 --- a/src/components/application_manager/test/resumption/resume_ctrl_test.cc +++ b/src/components/application_manager/test/resumption/resume_ctrl_test.cc @@ -766,8 +766,8 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppInFull) { mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL; uint32_t ign_off_count = 0; smart_objects::SmartObject saved_app; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; saved_app[application_manager::strings::ign_off_count] = ign_off_count; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -822,8 +822,8 @@ TEST_F(ResumeCtrlTest, StartAppHmiStateResumption_AppHasDeferredResumption) { mobile_apis::HMILevel::eType deferred_level = eType::HMI_FULL; uint32_t ign_off_count = 0; smart_objects::SmartObject saved_app; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; saved_app[application_manager::strings::ign_off_count] = ign_off_count; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -862,8 +862,8 @@ TEST_F(ResumeCtrlTest, mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL; uint32_t ign_off_count = 0; smart_objects::SmartObject saved_app; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; saved_app[application_manager::strings::ign_off_count] = ign_off_count; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -908,8 +908,8 @@ TEST_F( mobile_apis::HMILevel::eType restored_test_type = eType::HMI_LIMITED; uint32_t ign_off_count = 0; smart_objects::SmartObject saved_app; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; saved_app[application_manager::strings::ign_off_count] = ign_off_count; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1055,8 +1055,8 @@ TEST_F(ResumeCtrlTest, ApplicationResumptionTimer_AppInFull) { mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL; const uint32_t ign_off_count = 0u; smart_objects::SmartObject saved_app; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; saved_app[application_manager::strings::ign_off_count] = ign_off_count; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1401,8 +1401,8 @@ TEST_F( ResumeCtrlTest, ResumptionLowVoltage_AppInFullUnregisteredWithinTimeFrame_HMILevelRestored) { const mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; smart_objects::SmartObject saved_app; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1448,8 +1448,8 @@ TEST_F( ResumeCtrlTest, ResumptionLowVoltage_AppInFullUnregisteredBeyondTimeFrame_HMILevelNotRestored) { const mobile_apis::HMILevel::eType restored_test_type = eType::HMI_FULL; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ - time_offset; smart_objects::SmartObject saved_app; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1487,8 +1487,8 @@ TEST_F( TEST_F(ResumeCtrlTest, ResumptionLowVoltage_AppInBackground_NotRestored) { const mobile_apis::HMILevel::eType restored_test_type = eType::HMI_BACKGROUND; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ - time_offset; smart_objects::SmartObject saved_app; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1515,8 +1515,8 @@ TEST_F( ResumeCtrlTest, ResumptionLowVoltage_AppInLimitedlUnregisteredWithinTimeFrame_HMILevelRestored) { const mobile_apis::HMILevel::eType restored_test_type = eType::HMI_LIMITED; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ + time_offset; smart_objects::SmartObject saved_app; saved_app[application_manager::strings::hmi_level] = restored_test_type; @@ -1562,8 +1562,8 @@ TEST_F( ResumeCtrlTest, ResumptionLowVoltage_AppInLimitedlUnregisteredBeyondTimeFrame_HMILevelNotRestored) { const mobile_apis::HMILevel::eType restored_test_type = eType::HMI_LIMITED; - const uint32_t time_offset = 5; - const uint32_t time_stamp = + const int64_t time_offset = 5; + const int64_t time_stamp = time(nullptr) - resumption_delay_before_ign_ - time_offset; smart_objects::SmartObject saved_app; saved_app[application_manager::strings::hmi_level] = restored_test_type; diff --git a/src/components/application_manager/test/resumption/resumption_data_db_test.cc b/src/components/application_manager/test/resumption/resumption_data_db_test.cc index ec390e4be0..9f7058bec2 100644 --- a/src/components/application_manager/test/resumption/resumption_data_db_test.cc +++ b/src/components/application_manager/test/resumption/resumption_data_db_test.cc @@ -846,7 +846,7 @@ TEST_F(ResumptionDataDBTest, GetIgnOffTime_AfterSuspendAndAwake) { PrepareData(); EXPECT_TRUE(res_db()->Init()); SetZeroIgnOffTime(); - uint32_t last_ign_off_time; + int64_t last_ign_off_time; EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)); res_db()->SaveApplication(app_mock); @@ -856,11 +856,11 @@ TEST_F(ResumptionDataDBTest, GetIgnOffTime_AfterSuspendAndAwake) { res_db()->IncrementIgnOffCount(); - uint32_t after_suspend; + int64_t after_suspend; after_suspend = res_db()->GetIgnOffTime(); EXPECT_LE(last_ign_off_time, after_suspend); - uint32_t after_awake; + int64_t after_awake; res_db()->DecrementIgnOffCount(); after_awake = res_db()->GetIgnOffTime(); diff --git a/src/components/application_manager/test/resumption/resumption_data_json_test.cc b/src/components/application_manager/test/resumption/resumption_data_json_test.cc index 9d348ecbb7..24904dbce0 100644 --- a/src/components/application_manager/test/resumption/resumption_data_json_test.cc +++ b/src/components/application_manager/test/resumption/resumption_data_json_test.cc @@ -360,7 +360,7 @@ TEST_F(ResumptionDataJsonTest, GetHashId) { } TEST_F(ResumptionDataJsonTest, GetIgnOffTime_AfterSuspendAndAwake) { - uint32_t last_ign_off_time; + int64_t last_ign_off_time; PrepareData(); SetZeroIgnOff(); EXPECT_CALL(*mock_app_extension_, SaveResumptionData(_)); @@ -371,11 +371,11 @@ TEST_F(ResumptionDataJsonTest, GetIgnOffTime_AfterSuspendAndAwake) { res_json.IncrementIgnOffCount(); - uint32_t after_suspend; + int64_t after_suspend; after_suspend = res_json.GetIgnOffTime(); EXPECT_LE(last_ign_off_time, after_suspend); - uint32_t after_awake; + int64_t after_awake; res_json.DecrementIgnOffCount(); after_awake = res_json.GetIgnOffTime(); |