From 1c85833672be6491c8979873db3f560a760c8536 Mon Sep 17 00:00:00 2001 From: suozhipeng Date: Sat, 28 Sep 2024 18:04:13 +0800 Subject: [PATCH 1/2] fix: tdd_add Signed-off-by: suozhipeng --- .../mock/stats_client_test_mock_parcel.cpp | 2 + .../mock/stats_client_test_mock_peer.cpp | 1 + .../src/clienttest/stats_alarm_test.cpp | 4 ++ .../src/clienttest/stats_audio_test.cpp | 8 +++ .../src/clienttest/stats_bluetooth_test.cpp | 72 +++++++++++++++++++ .../src/clienttest/stats_camera_test.cpp | 36 ++++++++++ .../src/clienttest/stats_display_test.cpp | 29 ++++++++ .../src/clienttest/stats_dump_test.cpp | 18 +++++ .../src/clienttest/stats_location_test.cpp | 23 ++++++ .../src/clienttest/stats_phone_test.cpp | 48 +++++++++++++ .../src/clienttest/stats_powermgr_test.cpp | 22 ++++++ .../clienttest/stats_service_death_test.cpp | 2 + .../src/clienttest/stats_wifi_test.cpp | 39 ++++++++++ 13 files changed, 304 insertions(+) diff --git a/test/unittest/src/clienttest/mock/stats_client_test_mock_parcel.cpp b/test/unittest/src/clienttest/mock/stats_client_test_mock_parcel.cpp index 3f72aab..b5793f8 100644 --- a/test/unittest/src/clienttest/mock/stats_client_test_mock_parcel.cpp +++ b/test/unittest/src/clienttest/mock/stats_client_test_mock_parcel.cpp @@ -40,6 +40,7 @@ HWTEST_F (StatsClientTestMockParcel, StatsClientTestMockParcel_001, TestSize.Lev { STATS_HILOGI(LABEL_TEST, "StatsClientTestMockParcel_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); statsClient.SetOnBattery(true); auto infoList = statsClient.GetBatteryStats(); @@ -130,6 +131,7 @@ HWTEST_F (StatsClientTestMockParcel, StatsClientTestMockParcel_004, TestSize.Lev { STATS_HILOGI(LABEL_TEST, "StatsClientTestMockParcel_004 start"); std::shared_ptr sptrStatsInfo = std::make_shared(); + EXPECT_TRUE(sptrStatsProxy != nullptr); EXPECT_NE(sptrStatsInfo, nullptr); int32_t uid = 1004; int32_t userId = 10005; diff --git a/test/unittest/src/clienttest/mock/stats_client_test_mock_peer.cpp b/test/unittest/src/clienttest/mock/stats_client_test_mock_peer.cpp index 0c01ebc..5765710 100644 --- a/test/unittest/src/clienttest/mock/stats_client_test_mock_peer.cpp +++ b/test/unittest/src/clienttest/mock/stats_client_test_mock_peer.cpp @@ -35,6 +35,7 @@ HWTEST_F (StatsClientTestMockPeer, StatsClientTestMockPeer_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsClientTestMockPeer_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); statsClient.SetOnBattery(true); auto infoList = statsClient.GetBatteryStats(); diff --git a/test/unittest/src/clienttest/stats_alarm_test.cpp b/test/unittest/src/clienttest/stats_alarm_test.cpp index 81ae1a5..1310bc8 100644 --- a/test/unittest/src/clienttest/stats_alarm_test.cpp +++ b/test/unittest/src/clienttest/stats_alarm_test.cpp @@ -60,6 +60,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); int32_t uid = 10003; @@ -91,6 +92,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); double alarmOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_ALARM_ON); @@ -123,6 +125,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); int32_t uid = 10003; @@ -152,6 +155,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); statsClient.SetOnBattery(false); diff --git a/test/unittest/src/clienttest/stats_audio_test.cpp b/test/unittest/src/clienttest/stats_audio_test.cpp index 03cc3e7..bb1c23f 100644 --- a/test/unittest/src/clienttest/stats_audio_test.cpp +++ b/test/unittest/src/clienttest/stats_audio_test.cpp @@ -59,6 +59,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); int32_t uid = 10003; @@ -90,6 +91,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); double audioOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_AUDIO_ON); @@ -122,6 +124,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); int32_t uid = 10003; @@ -152,6 +155,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); double audioOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_AUDIO_ON); @@ -198,6 +202,8 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double audioOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_AUDIO_ON); @@ -238,6 +244,8 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsAudioTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double audioOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_AUDIO_ON); diff --git a/test/unittest/src/clienttest/stats_bluetooth_test.cpp b/test/unittest/src/clienttest/stats_bluetooth_test.cpp index b0a2318..06aebc7 100644 --- a/test/unittest/src/clienttest/stats_bluetooth_test.cpp +++ b/test/unittest/src/clienttest/stats_bluetooth_test.cpp @@ -94,6 +94,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -125,6 +127,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -158,6 +162,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Bluetooth::BTStateID::STATE_TURN_ON); @@ -189,6 +195,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -228,6 +236,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -267,6 +277,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -308,6 +320,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -339,6 +353,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -380,6 +396,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_009, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -411,6 +429,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -442,6 +462,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_011, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); @@ -476,6 +498,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_012, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Bluetooth::BTStateID::STATE_TURN_ON); @@ -507,6 +531,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_013, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); @@ -546,6 +572,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_014, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); @@ -585,6 +613,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_015, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); @@ -626,6 +656,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_016, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -657,6 +689,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_017, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_ON); @@ -698,6 +732,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_018, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -729,6 +765,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_019, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_019 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -761,6 +799,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_020, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_020 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); @@ -794,6 +834,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_021, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_021 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -825,6 +867,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_022, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_022 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); @@ -864,6 +908,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_023, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_023 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); @@ -904,6 +950,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_024, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_024 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -935,6 +983,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_025, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_025 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); @@ -976,6 +1026,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_026, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_026 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -1007,6 +1059,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_027, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_027 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_SCAN); @@ -1055,6 +1109,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_028, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_028 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -1085,6 +1141,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_029, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_029 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_SCAN); @@ -1116,6 +1174,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_030, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_030 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -1145,6 +1205,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_031, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_031 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_SCAN); @@ -1182,6 +1244,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_032, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_032 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -1211,6 +1275,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_033, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_033 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBleScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BLE_SCAN); @@ -1257,6 +1323,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_034, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_034 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); @@ -1295,6 +1363,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_035, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_035 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); statsClient.SetOnBattery(false); @@ -1328,6 +1398,8 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_036, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_036 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double bluetoothBrOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_BLUETOOTH_BR_ON); diff --git a/test/unittest/src/clienttest/stats_camera_test.cpp b/test/unittest/src/clienttest/stats_camera_test.cpp index 105092b..08ec6ad 100644 --- a/test/unittest/src/clienttest/stats_camera_test.cpp +++ b/test/unittest/src/clienttest/stats_camera_test.cpp @@ -60,6 +60,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -90,6 +92,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -121,6 +125,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -149,6 +155,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -183,6 +191,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -220,6 +230,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -253,6 +265,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -289,6 +303,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -326,6 +342,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_009, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -361,6 +379,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -399,6 +419,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_011, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -438,6 +460,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_012, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -461,6 +485,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_013, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); @@ -497,6 +523,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_014, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -528,6 +556,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_015, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double flashlightOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_FLASHLIGHT_ON); @@ -560,6 +590,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_016, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -589,6 +621,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_017, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double flashlightOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_FLASHLIGHT_ON); @@ -636,6 +670,8 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_018, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsCameraTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double cameraOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_CAMERA_ON); diff --git a/test/unittest/src/clienttest/stats_display_test.cpp b/test/unittest/src/clienttest/stats_display_test.cpp index a772ca2..edd5a5e 100644 --- a/test/unittest/src/clienttest/stats_display_test.cpp +++ b/test/unittest/src/clienttest/stats_display_test.cpp @@ -45,6 +45,8 @@ static void SetLastBrightness(int32_t lastBrightness) HiSysEvent::EventType::STATISTIC, "STATE", stateOff); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + GTEST_LOG_(INFO) << __func__ << ": Battery stats client reset"; statsClient.Reset(); } @@ -54,6 +56,7 @@ void StatsDisplayTest::SetUpTestCase() ParserAveragePowerFile(); system("hidumper -s 3302 -a -u"); auto& pms = PowerMgrClient::GetInstance(); + EXPECT_TRUE(pms != nullptr); pms.SuspendDevice(); } @@ -65,12 +68,16 @@ void StatsDisplayTest::TearDownTestCase() void StatsDisplayTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(true); } void StatsDisplayTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(false); } @@ -84,6 +91,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -116,6 +125,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); statsClient.SetOnBattery(false); @@ -149,6 +160,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -185,6 +198,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -216,6 +231,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -258,6 +275,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -294,6 +313,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -336,6 +357,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t brightness = 100; @@ -361,6 +384,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_009, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -402,6 +427,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); @@ -444,6 +471,8 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_011, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(OHOS::DisplayPowerMgr::DisplayState::DISPLAY_ON); diff --git a/test/unittest/src/clienttest/stats_dump_test.cpp b/test/unittest/src/clienttest/stats_dump_test.cpp index 69ec567..90b3ecd 100644 --- a/test/unittest/src/clienttest/stats_dump_test.cpp +++ b/test/unittest/src/clienttest/stats_dump_test.cpp @@ -46,12 +46,14 @@ void StatsDumpTest::TearDownTestCase() void StatsDumpTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.SetOnBattery(true); } void StatsDumpTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.SetOnBattery(false); } @@ -65,6 +67,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t batteryLevel = 60; @@ -96,6 +100,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10001; @@ -138,6 +144,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t ratio = 100; @@ -169,6 +177,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t pid = 3457; @@ -209,6 +219,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); std::string partName = "Battery"; @@ -240,6 +252,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); std::string callType = "DUBAI_TAG_DIST_SCHED_TO_REMOTE"; @@ -278,6 +292,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); std::string actionName = "thermallevel"; @@ -316,6 +332,8 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsDumpTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t type = 100; diff --git a/test/unittest/src/clienttest/stats_location_test.cpp b/test/unittest/src/clienttest/stats_location_test.cpp index 31f144d..17ec403 100644 --- a/test/unittest/src/clienttest/stats_location_test.cpp +++ b/test/unittest/src/clienttest/stats_location_test.cpp @@ -42,12 +42,15 @@ void StatsLocationTest::TearDownTestCase() void StatsLocationTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.SetOnBattery(true); } void StatsLocationTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(false); } @@ -62,6 +65,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -94,6 +99,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double gnssOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_GNSS_ON); @@ -127,6 +134,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -158,6 +167,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double gnssOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_GNSS_ON); @@ -197,6 +208,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -228,6 +241,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double gnssOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_GNSS_ON); @@ -269,6 +284,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); std::string stateOn = "start"; @@ -300,6 +317,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double gnssOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_GNSS_ON); @@ -348,6 +367,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_009, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); statsClient.SetOnBattery(false); @@ -381,6 +402,8 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsLocationTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double gnssOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_GNSS_ON); diff --git a/test/unittest/src/clienttest/stats_phone_test.cpp b/test/unittest/src/clienttest/stats_phone_test.cpp index 54262e3..00ed514 100644 --- a/test/unittest/src/clienttest/stats_phone_test.cpp +++ b/test/unittest/src/clienttest/stats_phone_test.cpp @@ -43,12 +43,16 @@ void StatsPhoneTest::TearDownTestCase() void StatsPhoneTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(true); } void StatsPhoneTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(false); } @@ -63,6 +67,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -93,6 +99,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -126,6 +134,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -155,6 +165,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -193,6 +205,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -231,6 +245,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -271,6 +287,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 10; @@ -300,6 +318,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -340,6 +360,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_009, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -370,6 +392,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -402,6 +426,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_011, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -431,6 +457,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_012, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -469,6 +497,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_013, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -507,6 +537,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_014, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 5; @@ -536,6 +568,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_015, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -576,6 +610,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_016, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t callStateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -625,6 +661,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_017, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t callStateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -680,6 +718,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_018, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); statsClient.SetOnBattery(false); @@ -719,6 +759,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_019, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_019 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -755,6 +797,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_020, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_020 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -806,6 +850,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_021, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_021 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(TelCallState::CALL_STATUS_ACTIVE); @@ -835,6 +881,8 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_022, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_022 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; diff --git a/test/unittest/src/clienttest/stats_powermgr_test.cpp b/test/unittest/src/clienttest/stats_powermgr_test.cpp index 53b3be9..8986efb 100644 --- a/test/unittest/src/clienttest/stats_powermgr_test.cpp +++ b/test/unittest/src/clienttest/stats_powermgr_test.cpp @@ -47,12 +47,16 @@ void StatsPowerMgrTest::TearDownTestCase() void StatsPowerMgrTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(true); } void StatsPowerMgrTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(false); } @@ -66,6 +70,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -96,6 +102,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double sensorGravityOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_GRAVITY); @@ -128,6 +136,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -157,6 +167,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double sensorGravityOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_GRAVITY); @@ -205,6 +217,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 1; @@ -235,6 +249,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double sensorProximityOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_PROXIMITY); @@ -267,6 +283,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t uid = 10003; @@ -296,6 +314,8 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double sensorProximityOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_SENSOR_PROXIMITY); @@ -460,6 +480,8 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsRadio_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "BatteryStatsRadio_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double actualPower = statsClient.GetPartStatsMah(BatteryStatsInfo::CONSUMPTION_TYPE_RADIO); diff --git a/test/unittest/src/clienttest/stats_service_death_test.cpp b/test/unittest/src/clienttest/stats_service_death_test.cpp index e935c7d..8bc01fd 100644 --- a/test/unittest/src/clienttest/stats_service_death_test.cpp +++ b/test/unittest/src/clienttest/stats_service_death_test.cpp @@ -44,6 +44,8 @@ HWTEST_F (StatsServiceDeathTest, StatsServiceDeathTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsServiceDeathTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + EXPECT_EQ(statsClient.Connect(), ERR_OK); std::shared_ptr deathRecipient = diff --git a/test/unittest/src/clienttest/stats_wifi_test.cpp b/test/unittest/src/clienttest/stats_wifi_test.cpp index 83b2e3e..55060fd 100644 --- a/test/unittest/src/clienttest/stats_wifi_test.cpp +++ b/test/unittest/src/clienttest/stats_wifi_test.cpp @@ -44,12 +44,15 @@ void StatsWifiTest::TearDownTestCase() void StatsWifiTest::SetUp() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); statsClient.SetOnBattery(true); } void StatsWifiTest::TearDown() { auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.SetOnBattery(false); } @@ -64,6 +67,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_001, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Wifi::ConnState::CONNECTED); @@ -93,6 +98,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_002, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -123,6 +130,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_003, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Wifi::ConnState::CONNECTED); @@ -152,6 +161,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_004, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -189,6 +200,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_005, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -226,6 +239,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_006, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = 3; @@ -255,6 +270,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_007, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -294,6 +311,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_008, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Wifi::ConnState::CONNECTED); @@ -323,6 +342,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_09, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int16_t count = 2; @@ -352,6 +373,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_010, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_SCAN); @@ -382,6 +405,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_011, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double fullPercent = 1; @@ -410,6 +435,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_012, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_SCAN); @@ -446,6 +473,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_013, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int16_t count = 2; @@ -471,6 +500,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_014, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -514,6 +545,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_015, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); statsClient.SetOnBattery(false); @@ -552,6 +585,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_016, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiOnAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_ON); @@ -587,6 +622,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_017, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_017 is start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); double wifiScanAverageMa = g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_WIFI_SCAN); @@ -628,6 +665,8 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_018, TestSize.Level0) { STATS_HILOGI(LABEL_TEST, "StatsWifiTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); + EXPECT_TRUE(statsClient != nullptr); + statsClient.Reset(); int32_t stateOn = static_cast(Wifi::ConnState::CONNECTED); -- Gitee From 76363bd79a9118b75646381a55cb124b06920730 Mon Sep 17 00:00:00 2001 From: suozhipeng Date: Thu, 24 Oct 2024 15:04:52 +0800 Subject: [PATCH 2/2] fix: add_code Signed-off-by: suozhipeng --- test/systemtest/src/batterystats_sys_test.cpp | 92 +++++------ .../src/clienttest/stats_alarm_test.cpp | 16 +- .../src/clienttest/stats_audio_test.cpp | 24 +-- .../src/clienttest/stats_bluetooth_test.cpp | 144 ++++++++--------- .../src/clienttest/stats_camera_test.cpp | 72 ++++----- .../src/clienttest/stats_display_test.cpp | 44 ++--- .../src/clienttest/stats_dump_test.cpp | 32 ++-- .../src/clienttest/stats_location_test.cpp | 40 ++--- .../src/clienttest/stats_phone_test.cpp | 88 +++++----- .../src/clienttest/stats_powermgr_test.cpp | 48 +++--- .../clienttest/stats_service_death_test.cpp | 12 +- .../src/clienttest/stats_service_test.cpp | 24 +-- .../src/clienttest/stats_util_test.cpp | 40 ++--- .../src/clienttest/stats_wifi_test.cpp | 74 ++++----- .../mock/stats_service_test_mock_parcel.cpp | 4 +- .../servicetest/stats_service_alarm_test.cpp | 28 ++-- .../servicetest/stats_service_audio_test.cpp | 32 ++-- .../stats_service_bluetooth_test.cpp | 152 +++++++++--------- .../servicetest/stats_service_camera_test.cpp | 84 +++++----- .../servicetest/stats_service_core_test.cpp | 28 ++-- .../stats_service_display_test.cpp | 48 +++--- .../servicetest/stats_service_dump_test.cpp | 36 ++--- .../stats_service_location_test.cpp | 48 +++--- .../servicetest/stats_service_phone_test.cpp | 88 +++++----- .../stats_service_powermgr_test.cpp | 48 +++--- .../servicetest/stats_service_stub_test.cpp | 12 +- .../stats_service_subscriber_test.cpp | 24 +-- .../servicetest/stats_service_wifi_test.cpp | 76 ++++----- 28 files changed, 729 insertions(+), 729 deletions(-) diff --git a/test/systemtest/src/batterystats_sys_test.cpp b/test/systemtest/src/batterystats_sys_test.cpp index 8ced23e..eb32c89 100755 --- a/test/systemtest/src/batterystats_sys_test.cpp +++ b/test/systemtest/src/batterystats_sys_test.cpp @@ -102,7 +102,7 @@ void BatterystatsSysTest::TearDown() */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_001, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_001 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -150,7 +150,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_001, TestSize.Level0) EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); EXPECT_EQ(expectedTimeSec, actualTimeSec); EXPECT_TRUE(index != string::npos); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_001 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_001 end"); } /** @@ -161,7 +161,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_001, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_002, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_002 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -204,7 +204,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_002, TestSize.Level0) EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); EXPECT_EQ(expectedTimeSec, actualTimeSec); EXPECT_TRUE(index != string::npos); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_002 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_002 end"); } /** @@ -215,7 +215,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_002, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_003, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_003 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -235,7 +235,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_003, TestSize.Level0) std::string actualDebugInfo = statsClient.Dump(dumpArgs); auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_003 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_003 end"); } /** @@ -246,7 +246,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_003, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_004, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_004 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -266,7 +266,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_004, TestSize.Level0) std::string actualDebugInfo = statsClient.Dump(dumpArgs); auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_004 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_004 end"); } /** @@ -277,7 +277,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_004, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_005, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_005 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -307,7 +307,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_005, TestSize.Level0) std::string actualDebugInfo = statsClient.Dump(dumpArgs); auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_005 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_005 end"); } /** @@ -318,14 +318,14 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_005, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_006, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_006 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); std::string result; result.clear(); result = statsClient.Dump(dumpArgs); EXPECT_TRUE(result != ""); statsClient.Reset(); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_006 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_006 end"); } /** @@ -336,7 +336,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_006, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_007, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_007 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); #ifdef HAS_BATTERYSTATS_BLUETOOTH_PART @@ -358,7 +358,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); #endif - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_007 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_007 end"); } /** @@ -369,7 +369,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_007, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_008, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_008 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); #ifdef HAS_BATTERYSTATS_WIFI_PART @@ -389,7 +389,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); #endif - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_008 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_008 end"); } /** @@ -400,7 +400,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_008, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_009, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_009 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); #ifdef HAS_BATTERYSTATS_CALL_MANAGER_PART @@ -422,7 +422,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); #endif - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_009 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_009 end"); } /** @@ -433,14 +433,14 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_009, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_010, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_010 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); double actualPower = statsClient.GetPartStatsMah(BatteryStatsInfo::CONSUMPTION_TYPE_IDLE); GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_TRUE(actualPower >= StatsUtils::DEFAULT_VALUE); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_010 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_010 end"); } /** @@ -451,7 +451,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_010, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_011, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_011 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -460,7 +460,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_011, TestSize.Level0) double actualPower = statsClient.GetAppStatsMah(uerId); GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_TRUE(actualPower >= StatsUtils::DEFAULT_VALUE); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_011 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_011 end"); } /** @@ -471,7 +471,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_011, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_012, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_012 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -493,7 +493,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_012 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_012 end"); } /** @@ -504,7 +504,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_012, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_013, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_013 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -526,7 +526,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_013 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_013 end"); } /** @@ -537,7 +537,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_013, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_014, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_014 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -559,7 +559,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_014 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_014 end"); } /** @@ -570,7 +570,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_014, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_015, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_015 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -591,7 +591,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_015 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_015 end"); } /** @@ -602,7 +602,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_015, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_016, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_016 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -624,7 +624,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_016 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_016 end"); } /** @@ -635,7 +635,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_016, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_017, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_017 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -672,7 +672,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_017, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_017 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_017 end"); } /** @@ -683,7 +683,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_017, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_018, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_018 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -723,7 +723,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_018, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_018 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_018 end"); } /** @@ -734,7 +734,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_018, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_019, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_019 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_019 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -784,7 +784,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_019, TestSize.Level0) actualPower = statsClient.GetAppStatsMah(uid); devPrecent = abs(expectedPower - actualPower) / expectedPower; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_019 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_019 end"); } /** @@ -795,7 +795,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_019, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_020, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_020 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_020 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -836,7 +836,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_020, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_020 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_020 end"); } /** @@ -847,7 +847,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_020, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_021, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_021 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_021 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -866,7 +866,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_021, TestSize.Level0) result.clear(); result = statsClient.Dump(dumpArgs); EXPECT_TRUE(result != ""); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_021 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_021 end"); } /** @@ -877,7 +877,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_021, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_022, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_022 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_022 start"); auto& statsClient = BatteryStatsClient::GetInstance(); statsClient.Reset(); @@ -904,7 +904,7 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_022, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_022 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_022 end"); } /** @@ -915,9 +915,9 @@ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_022, TestSize.Level0) */ HWTEST_F (BatterystatsSysTest, BatteryStatsSysTest_023, TestSize.Level0) { - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_023 start"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_023 start"); auto& statsClient = BatteryStatsClient::GetInstance(); StatsError error = statsClient.GetLastError(); EXPECT_TRUE(error == StatsError::ERR_OK) << "last error is " << static_cast(error); - STATS_HILOGD(LABEL_TEST, "BatteryStatsSysTest_023 end"); + STATS_HILOGI(LABEL_TEST, "BatteryStatsSysTest_023 end"); } diff --git a/test/unittest/src/clienttest/stats_alarm_test.cpp b/test/unittest/src/clienttest/stats_alarm_test.cpp index 1310bc8..91e10cd 100644 --- a/test/unittest/src/clienttest/stats_alarm_test.cpp +++ b/test/unittest/src/clienttest/stats_alarm_test.cpp @@ -58,7 +58,7 @@ namespace { */ HWTEST_F (StatsAlarmTest, StatsAlarmTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -79,7 +79,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_001 end"); } /** @@ -90,7 +90,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_001, TestSize.Level0) */ HWTEST_F (StatsAlarmTest, StatsAlarmTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -112,7 +112,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_002 end"); } /** @@ -123,7 +123,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_002, TestSize.Level0) */ HWTEST_F (StatsAlarmTest, StatsAlarmTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -142,7 +142,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_003, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_003 end"); } /** @@ -153,7 +153,7 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_003, TestSize.Level0) */ HWTEST_F (StatsAlarmTest, StatsAlarmTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -175,6 +175,6 @@ HWTEST_F (StatsAlarmTest, StatsAlarmTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsAlarmTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsAlarmTest_004 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_audio_test.cpp b/test/unittest/src/clienttest/stats_audio_test.cpp index bb1c23f..470cb1e 100644 --- a/test/unittest/src/clienttest/stats_audio_test.cpp +++ b/test/unittest/src/clienttest/stats_audio_test.cpp @@ -57,7 +57,7 @@ namespace { */ HWTEST_F (StatsAudioTest, StatsAudioTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -79,7 +79,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_001 end"); } /** @@ -89,7 +89,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_001, TestSize.Level0) */ HWTEST_F (StatsAudioTest, StatsAudioTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -112,7 +112,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_002 end"); } /** @@ -122,7 +122,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_002, TestSize.Level0) */ HWTEST_F (StatsAudioTest, StatsAudioTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -143,7 +143,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_003, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_003 end"); } /** @@ -153,7 +153,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_003, TestSize.Level0) */ HWTEST_F (StatsAudioTest, StatsAudioTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); statsClient.Reset(); @@ -190,7 +190,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_004 end"); } /** @@ -200,7 +200,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_004, TestSize.Level0) */ HWTEST_F (StatsAudioTest, StatsAudioTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -232,7 +232,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_005 end"); } /** @@ -242,7 +242,7 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_005, TestSize.Level0) */ HWTEST_F (StatsAudioTest, StatsAudioTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -283,6 +283,6 @@ HWTEST_F (StatsAudioTest, StatsAudioTest_006, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsAudioTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsAudioTest_006 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_bluetooth_test.cpp b/test/unittest/src/clienttest/stats_bluetooth_test.cpp index 06aebc7..d9623bf 100644 --- a/test/unittest/src/clienttest/stats_bluetooth_test.cpp +++ b/test/unittest/src/clienttest/stats_bluetooth_test.cpp @@ -92,7 +92,7 @@ namespace { */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -114,7 +114,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_001 end"); } /** @@ -125,7 +125,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_001, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -149,7 +149,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_002 end"); } /** @@ -160,7 +160,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_002, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -182,7 +182,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_003, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_BLUETOOTH); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_003 end"); } /** @@ -193,7 +193,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_003, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -223,7 +223,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_004 end"); } /** @@ -234,7 +234,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_004, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -264,7 +264,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_005 end"); } /** @@ -275,7 +275,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_005, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -307,7 +307,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_006 end"); } /** @@ -318,7 +318,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_006, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -340,7 +340,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_007 end"); } /** @@ -351,7 +351,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_007, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -383,7 +383,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_008 end"); } /** @@ -394,7 +394,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_008, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -416,7 +416,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_009 end"); } /** @@ -427,7 +427,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_009, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -449,7 +449,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_010 end"); } /** @@ -460,7 +460,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_010, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -485,7 +485,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_011, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_011 end"); } /** @@ -496,7 +496,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_011, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -518,7 +518,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_012, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_BLUETOOTH); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_012 end"); } /** @@ -529,7 +529,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_012, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -559,7 +559,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_013 end"); } /** @@ -570,7 +570,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_013, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -600,7 +600,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_014 end"); } /** @@ -611,7 +611,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_014, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -643,7 +643,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_015 end"); } /** @@ -654,7 +654,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_015, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -676,7 +676,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_016 end"); } /** @@ -687,7 +687,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_016, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -719,7 +719,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_017, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_017 end"); } /** @@ -730,7 +730,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_017, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -752,7 +752,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_018, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_018 end"); } /** @@ -763,7 +763,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_018, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_019 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -786,7 +786,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_019, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_019 end"); } /** @@ -797,7 +797,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_019, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_020, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_020 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_020 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -821,7 +821,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_020, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_020 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_020 end"); } /** @@ -832,7 +832,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_020, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_021, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_021 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_021 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -854,7 +854,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_021, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_021 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_021 end"); } /** @@ -865,7 +865,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_021, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_022, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_022 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_022 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -895,7 +895,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_022, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_022 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_022 end"); } /** @@ -906,7 +906,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_022, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_023, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_023 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_023 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -937,7 +937,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_023, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_023 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_023 end"); } /** @@ -948,7 +948,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_023, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_024, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_024 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_024 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -970,7 +970,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_024, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_024 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_024 end"); } /** @@ -981,7 +981,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_024, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_025, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_025 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_025 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1013,7 +1013,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_025, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_025 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_025 end"); } /** @@ -1024,7 +1024,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_025, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_026, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_026 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_026 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1046,7 +1046,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_026, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_026 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_026 end"); } /** @@ -1057,7 +1057,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_026, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_027, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_027 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_027 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1096,7 +1096,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_027, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption Two = " << expectedPowerTwo << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption Two = " << actualPowerTwo << " mAh"; EXPECT_LE(devPrecentTwo, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_027 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_027 end"); } /** @@ -1107,7 +1107,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_027, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_028, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_028 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_028 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1128,7 +1128,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_028, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_028 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_028 end"); } /** @@ -1139,7 +1139,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_028, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_029, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_029 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_029 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1161,7 +1161,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_029, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_029 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_029 end"); } /** @@ -1172,7 +1172,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_029, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_030, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_030 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_030 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1192,7 +1192,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_030, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_030 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_030 end"); } /** @@ -1203,7 +1203,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_030, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_031, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_031 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_031 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1231,7 +1231,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_031, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_031 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_031 end"); } /** @@ -1242,7 +1242,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_031, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_032, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_032 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_032 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1262,7 +1262,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_032, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_032 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_032 end"); } /** @@ -1273,7 +1273,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_032, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_033, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_033 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_033 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1310,7 +1310,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_033, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption Two = " << expectedPowerTwo << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption Two = " << actualPowerTwo << " mAh"; EXPECT_LE(devPrecentTwo, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_033 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_033 end"); } /** @@ -1321,7 +1321,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_033, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_034, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_034 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_034 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1350,7 +1350,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_034, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected soft consumption = " << expectedSoftPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual soft consumption = " << actualSoftPower << " mAh"; EXPECT_LE(devPrecentSoft, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_034 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_034 end"); } /** @@ -1361,7 +1361,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_034, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_035, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_035 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_035 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1385,7 +1385,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_035, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual soft consumption = " << actualSoftPower << " mAh"; EXPECT_EQ(expectedPower, actualSoftPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_035 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_035 end"); } /** @@ -1396,7 +1396,7 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_035, TestSize.Level0) */ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_036, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_036 start"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_036 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -1424,6 +1424,6 @@ HWTEST_F (StatsBluetoothTest, StatsBluetoothTest_036, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsBluetoothTest_036 end"); + STATS_HILOGD(LABEL_TEST, "StatsBluetoothTest_036 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_camera_test.cpp b/test/unittest/src/clienttest/stats_camera_test.cpp index 08ec6ad..2016569 100644 --- a/test/unittest/src/clienttest/stats_camera_test.cpp +++ b/test/unittest/src/clienttest/stats_camera_test.cpp @@ -58,7 +58,7 @@ namespace { */ HWTEST_F (StatsCameraTest, StatsCameraTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -80,7 +80,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_001 end"); } /** @@ -90,7 +90,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_001, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -113,7 +113,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_002 end"); } /** @@ -123,7 +123,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_002, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -143,7 +143,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_003, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_003 end"); } /** @@ -153,7 +153,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_003, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -179,7 +179,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_004 end"); } /** @@ -189,7 +189,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_004, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -218,7 +218,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_005 end"); } /** @@ -228,7 +228,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_005, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -253,7 +253,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_006, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_006 end"); } /** @@ -263,7 +263,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_006, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -291,7 +291,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_007 end"); } /** @@ -301,7 +301,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_007, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -330,7 +330,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_008 end"); } /** @@ -340,7 +340,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_008, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -367,7 +367,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_009, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_009 end"); } /** @@ -377,7 +377,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_009, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -407,7 +407,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_010 end"); } /** @@ -417,7 +417,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_010, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -448,7 +448,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_011, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_011 end"); } /** @@ -458,7 +458,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_011, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -473,7 +473,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_012, TestSize.Level0) double actualPower = statsClient.GetAppStatsMah(uid); GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_TRUE(actualPower >= StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_012 end"); } /** @@ -483,7 +483,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_012, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -511,7 +511,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_013 end"); } /** @@ -521,7 +521,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_013, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -544,7 +544,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_014 end"); } /** @@ -554,7 +554,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_014, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -578,7 +578,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_015 end"); } /** @@ -588,7 +588,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_015, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -609,7 +609,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_016, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_016 end"); } /** @@ -619,7 +619,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_016, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -658,7 +658,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_017, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_017 end"); } /** @@ -668,7 +668,7 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_017, TestSize.Level0) */ HWTEST_F (StatsCameraTest, StatsCameraTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -707,6 +707,6 @@ HWTEST_F (StatsCameraTest, StatsCameraTest_018, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsCameraTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsCameraTest_018 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_display_test.cpp b/test/unittest/src/clienttest/stats_display_test.cpp index edd5a5e..6e27683 100644 --- a/test/unittest/src/clienttest/stats_display_test.cpp +++ b/test/unittest/src/clienttest/stats_display_test.cpp @@ -89,7 +89,7 @@ namespace { */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -113,7 +113,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_001 end"); } /** @@ -123,7 +123,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_001, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -148,7 +148,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_002 end"); } /** @@ -158,7 +158,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_002, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -186,7 +186,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_003, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_003 end"); } /** @@ -196,7 +196,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_003, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -219,7 +219,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_004, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_SCREEN); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_004 end"); } /** @@ -229,7 +229,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_004, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -263,7 +263,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_005 end"); } /** @@ -273,7 +273,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_005, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -301,7 +301,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_006 end"); } /** @@ -311,7 +311,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_006, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -345,7 +345,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_007 end"); } /** @@ -355,7 +355,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_007, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -372,7 +372,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_008 end"); } /** @@ -382,7 +382,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_008, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -415,7 +415,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_009 end"); } /** @@ -425,7 +425,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_009, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -459,7 +459,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_010 end"); } /** @@ -469,7 +469,7 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_010, TestSize.Level0) */ HWTEST_F (StatsDisplayTest, StatsDisplayTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -505,6 +505,6 @@ HWTEST_F (StatsDisplayTest, StatsDisplayTest_011, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsDisplayTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsDisplayTest_011 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_dump_test.cpp b/test/unittest/src/clienttest/stats_dump_test.cpp index 90b3ecd..9e25ad6 100644 --- a/test/unittest/src/clienttest/stats_dump_test.cpp +++ b/test/unittest/src/clienttest/stats_dump_test.cpp @@ -65,7 +65,7 @@ namespace { */ HWTEST_F (StatsDumpTest, StatsDumpTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -88,7 +88,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_001 end"); } /** @@ -98,7 +98,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_001, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -132,7 +132,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_002 end"); } /** @@ -142,7 +142,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_002, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -165,7 +165,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_003, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_003 end"); } /** @@ -175,7 +175,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_003, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -207,7 +207,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_004 end"); } /** @@ -217,7 +217,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_004, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -240,7 +240,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_005 end"); } /** @@ -250,7 +250,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_005, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -280,7 +280,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_006 end"); } /** @@ -290,7 +290,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_006, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -320,7 +320,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_007 end"); } /** @@ -330,7 +330,7 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_007, TestSize.Level0) */ HWTEST_F (StatsDumpTest, StatsDumpTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -356,6 +356,6 @@ HWTEST_F (StatsDumpTest, StatsDumpTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual debug info: " << actualDebugInfo; auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsDumpTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsDumpTest_008 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_location_test.cpp b/test/unittest/src/clienttest/stats_location_test.cpp index 17ec403..1c2b79a 100644 --- a/test/unittest/src/clienttest/stats_location_test.cpp +++ b/test/unittest/src/clienttest/stats_location_test.cpp @@ -63,7 +63,7 @@ namespace { */ HWTEST_F (StatsLocationTest, StatsLocationTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -86,7 +86,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_001 end"); } /** @@ -97,7 +97,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_001, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -121,7 +121,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_002 end"); } /** @@ -132,7 +132,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_002, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -154,7 +154,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_003, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_003 end"); } /** @@ -165,7 +165,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_003, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -195,7 +195,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_004 end"); } /** @@ -206,7 +206,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_004, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -228,7 +228,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_005 end"); } /** @@ -239,7 +239,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_005, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -271,7 +271,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_006 end"); } /** @@ -282,7 +282,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_006, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -304,7 +304,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_007 end"); } /** @@ -315,7 +315,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_007, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -354,7 +354,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected second uid consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual second uid consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_008 end"); } /** @@ -365,7 +365,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_008, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -389,7 +389,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_009 end"); } /** @@ -400,7 +400,7 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_009, TestSize.Level0) */ HWTEST_F (StatsLocationTest, StatsLocationTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -428,6 +428,6 @@ HWTEST_F (StatsLocationTest, StatsLocationTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsLocationTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsLocationTest_010 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_phone_test.cpp b/test/unittest/src/clienttest/stats_phone_test.cpp index 00ed514..940b1d8 100644 --- a/test/unittest/src/clienttest/stats_phone_test.cpp +++ b/test/unittest/src/clienttest/stats_phone_test.cpp @@ -65,7 +65,7 @@ namespace { */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -86,7 +86,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_001 end"); } /** @@ -97,7 +97,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_001, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -121,7 +121,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_002 end"); } /** @@ -132,7 +132,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_002, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -152,7 +152,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_003, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_PHONE); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_003 end"); } /** @@ -163,7 +163,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_003, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -192,7 +192,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_004 end"); } /** @@ -203,7 +203,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_004, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -232,7 +232,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_005 end"); } /** @@ -243,7 +243,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_005, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -274,7 +274,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_006 end"); } /** @@ -285,7 +285,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_006, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -305,7 +305,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_007 end"); } /** @@ -316,7 +316,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_007, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -347,7 +347,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_008 end"); } /** @@ -358,7 +358,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_008, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -379,7 +379,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_009 end"); } /** @@ -390,7 +390,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_009, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -413,7 +413,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_010 end"); } /** @@ -424,7 +424,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_010, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -444,7 +444,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_011, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_PHONE); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_011 end"); } /** @@ -455,7 +455,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_011, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -484,7 +484,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_012 end"); } /** @@ -495,7 +495,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_012, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -524,7 +524,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_013 end"); } /** @@ -535,7 +535,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_013, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -555,7 +555,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_014 end"); } /** @@ -566,7 +566,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_014, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -597,7 +597,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_015 end"); } /** @@ -608,7 +608,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_015, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -648,7 +648,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_016 end"); } /** @@ -659,7 +659,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_016, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_017 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -705,7 +705,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_017, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_017 end"); } /** @@ -716,7 +716,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_017, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -746,7 +746,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_018, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_018 end"); } /** @@ -757,7 +757,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_018, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_019 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -784,7 +784,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_019, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_019 end"); } /** @@ -795,7 +795,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_019, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_020, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_020 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_020 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -837,7 +837,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_020, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_020 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_020 end"); } /** @@ -848,7 +848,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_020, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_021, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_021 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_021 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -868,7 +868,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_021, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_021 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_021 end"); } /** @@ -879,7 +879,7 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_021, TestSize.Level0) */ HWTEST_F (StatsPhoneTest, StatsPhoneTest_022, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_022 start"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_022 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -899,6 +899,6 @@ HWTEST_F (StatsPhoneTest, StatsPhoneTest_022, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsPhoneTest_022 end"); + STATS_HILOGD(LABEL_TEST, "StatsPhoneTest_022 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_powermgr_test.cpp b/test/unittest/src/clienttest/stats_powermgr_test.cpp index 8986efb..62fcc07 100644 --- a/test/unittest/src/clienttest/stats_powermgr_test.cpp +++ b/test/unittest/src/clienttest/stats_powermgr_test.cpp @@ -68,7 +68,7 @@ namespace { */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -90,7 +90,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_001 end"); } /** @@ -100,7 +100,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_001, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -124,7 +124,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_002 end"); } /** @@ -134,7 +134,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_002, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -155,7 +155,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_003, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_003 end"); } /** @@ -165,7 +165,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_003, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -205,7 +205,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_004, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_004 end"); } /** @@ -215,7 +215,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_004, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -237,7 +237,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_005 end"); } /** @@ -247,7 +247,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_005, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -271,7 +271,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_006 end"); } /** @@ -281,7 +281,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_006, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -302,7 +302,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_007, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_007 end"); } /** @@ -312,7 +312,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_007, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -352,7 +352,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_008, TestSize.Level0) double actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsPowerMgrTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsPowerMgrTest_008 end"); } /** @@ -363,7 +363,7 @@ HWTEST_F (StatsPowerMgrTest, StatsPowerMgrTest_008, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "BatteryStatsInfo_001 start"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsInfo_001 start"); std::shared_ptr sptrStatsInfo = std::make_shared(); EXPECT_NE(sptrStatsInfo, nullptr); int32_t uid = 1004; @@ -398,7 +398,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_001, TestSize.Level0) EXPECT_EQ(uid, unmarshalInfo->GetUid()); EXPECT_EQ(consumptionType, unmarshalInfo->GetConsumptionType()); EXPECT_EQ(totalPowerMah, unmarshalInfo->GetPower()); - STATS_HILOGI(LABEL_TEST, "BatteryStatsInfo_001 end"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsInfo_001 end"); } /** @@ -409,7 +409,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_001, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "BatteryStatsInfo_002 start"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsInfo_002 start"); EXPECT_EQ("", BatteryStatsInfo::ConvertConsumptionType(BatteryStatsInfo::CONSUMPTION_TYPE_INVALID)); EXPECT_EQ(GET_VARIABLE_NAME(CONSUMPTION_TYPE_APP), BatteryStatsInfo::ConvertConsumptionType(BatteryStatsInfo::CONSUMPTION_TYPE_APP)); @@ -441,7 +441,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_002, TestSize.Level0) BatteryStatsInfo::ConvertConsumptionType(BatteryStatsInfo::CONSUMPTION_TYPE_WAKELOCK)); EXPECT_EQ(GET_VARIABLE_NAME(CONSUMPTION_TYPE_ALARM), BatteryStatsInfo::ConvertConsumptionType(BatteryStatsInfo::CONSUMPTION_TYPE_ALARM)); - STATS_HILOGI(LABEL_TEST, "BatteryStatsInfo_002 end"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsInfo_002 end"); } /** @@ -452,7 +452,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsInfo_002, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, BatteryStatsParser_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "BatteryStatsParser_001 start"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsParser_001 start"); uint16_t normalLevel = 0; uint16_t errorRadioOnLevel = 10; EXPECT_EQ(0.0, g_statsParser->GetAveragePowerMa(StatsUtils::CURRENT_INVALID)); @@ -467,7 +467,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsParser_001, TestSize.Level0) uint16_t errorSpeedCluster = 3; EXPECT_EQ(expectSpeedCluster0Num, g_statsParser->GetSpeedNum(speedClusterZero)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, g_statsParser->GetSpeedNum(errorSpeedCluster)); - STATS_HILOGI(LABEL_TEST, "BatteryStatsParser_001 end"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsParser_001 end"); } /** @@ -478,7 +478,7 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsParser_001, TestSize.Level0) */ HWTEST_F (StatsPowerMgrTest, BatteryStatsRadio_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "BatteryStatsRadio_001 start"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsRadio_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -487,6 +487,6 @@ HWTEST_F (StatsPowerMgrTest, BatteryStatsRadio_001, TestSize.Level0) double actualPower = statsClient.GetPartStatsMah(BatteryStatsInfo::CONSUMPTION_TYPE_RADIO); double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_RADIO); EXPECT_TRUE(actualPower >= StatsUtils::DEFAULT_VALUE && actualPercent >= StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "BatteryStatsRadio_001 end"); + STATS_HILOGD(LABEL_TEST, "BatteryStatsRadio_001 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_service_death_test.cpp b/test/unittest/src/clienttest/stats_service_death_test.cpp index 8bc01fd..7b49645 100644 --- a/test/unittest/src/clienttest/stats_service_death_test.cpp +++ b/test/unittest/src/clienttest/stats_service_death_test.cpp @@ -42,7 +42,7 @@ namespace { */ HWTEST_F (StatsServiceDeathTest, StatsServiceDeathTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDeathTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDeathTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -54,7 +54,7 @@ HWTEST_F (StatsServiceDeathTest, StatsServiceDeathTest_001, TestSize.Level0) EXPECT_NE(deathRecipient, nullptr); deathRecipient->OnRemoteDied(remoteObj); EXPECT_NE(statsClient.proxy_, nullptr); - STATS_HILOGI(LABEL_TEST, "StatsServiceDeathTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDeathTest_001 end"); } /** @@ -64,13 +64,13 @@ HWTEST_F (StatsServiceDeathTest, StatsServiceDeathTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceDeathTest, StatsParserTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 start"); auto parser = std::make_shared(); EXPECT_TRUE(parser != nullptr); bool ret = parser->Init(); EXPECT_FALSE(ret); - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 end"); } /** @@ -80,12 +80,12 @@ HWTEST_F (StatsServiceDeathTest, StatsParserTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceDeathTest, StatsServiceTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_001 start"); auto statsService = BatteryStatsService::GetInstance(); EXPECT_TRUE(statsService != nullptr); statsService->OnStart(); bool ret = statsService->IsServiceReady(); EXPECT_FALSE(ret); - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_001 end"); } } diff --git a/test/unittest/src/clienttest/stats_service_test.cpp b/test/unittest/src/clienttest/stats_service_test.cpp index 1755c83..0f70fe7 100755 --- a/test/unittest/src/clienttest/stats_service_test.cpp +++ b/test/unittest/src/clienttest/stats_service_test.cpp @@ -72,12 +72,12 @@ namespace { */ HWTEST_F (StatsServiceTest, StatsServiceTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_001 start"); sptr sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager(); ASSERT_TRUE(sam != nullptr) << "StatsServiceTest_001 fail to get GetSystemAbilityManager"; sptr remoteObject_ = sam->CheckSystemAbility(POWER_MANAGER_BATT_STATS_SERVICE_ID); ASSERT_TRUE(remoteObject_ != nullptr) << "GetSystemAbility failed."; - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_001 end"); } /** @@ -87,7 +87,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceTest, StatsServiceTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_002 start"); auto statsService = BatteryStatsService::GetInstance(); EXPECT_TRUE(statsService != nullptr); @@ -95,7 +95,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_002, TestSize.Level0) statsService->OnStart(); bool ret = statsService->IsServiceReady(); EXPECT_FALSE(ret); - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_002 end"); } /** @@ -105,7 +105,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceTest, StatsServiceTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_003 start"); auto statsService = BatteryStatsService::GetInstance(); EXPECT_TRUE(statsService != nullptr); @@ -115,7 +115,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_003, TestSize.Level0) statsService->OnStop(); bool ret = statsService->IsServiceReady(); EXPECT_FALSE(ret); - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_003 end"); } /** @@ -125,7 +125,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceTest, StatsServiceTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_004 start"); auto statsService = BatteryStatsService::GetInstance(); EXPECT_TRUE(statsService != nullptr); @@ -134,7 +134,7 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_004, TestSize.Level0) statsService->isBootCompleted_ = true; int32_t ret = statsService->Dump(fd, vec); EXPECT_EQ(ret, OHOS::ERR_OK); - STATS_HILOGI(LABEL_TEST, "StatsServiceTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTest_004 end"); } /** @@ -144,13 +144,13 @@ HWTEST_F (StatsServiceTest, StatsServiceTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceTest, StatsParserTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 start"); auto parser = std::make_shared(); EXPECT_TRUE(parser != nullptr); bool ret = parser->Init(); EXPECT_TRUE(ret); - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 end"); } /** @@ -160,7 +160,7 @@ HWTEST_F (StatsServiceTest, StatsParserTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceTest, StatsParserTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsParserTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_002 start"); auto parser = std::make_shared(); EXPECT_TRUE(parser != nullptr); @@ -168,6 +168,6 @@ HWTEST_F (StatsServiceTest, StatsParserTest_002, TestSize.Level0) std::string result = ""; parser->DumpInfo(result); EXPECT_TRUE(result != ""); - STATS_HILOGI(LABEL_TEST, "StatsParserTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_002 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_util_test.cpp b/test/unittest/src/clienttest/stats_util_test.cpp index 7ab701e..e754eea 100644 --- a/test/unittest/src/clienttest/stats_util_test.cpp +++ b/test/unittest/src/clienttest/stats_util_test.cpp @@ -52,10 +52,10 @@ namespace { */ HWTEST_F (StatsUtilTest, StatsHiSysEvent_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHiSysEvent_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsHiSysEvent_001 start"); EXPECT_TRUE(StatsHiSysEvent::CheckHiSysEvent(StatsHiSysEvent::POWER_RUNNINGLOCK)); EXPECT_FALSE(StatsHiSysEvent::CheckHiSysEvent("POWER_RUNNINGLOCK_WRONG")); - STATS_HILOGI(LABEL_TEST, "StatsHiSysEvent_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsHiSysEvent_001 end"); } /** @@ -66,7 +66,7 @@ HWTEST_F (StatsUtilTest, StatsHiSysEvent_001, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsUtils_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsUtils_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsUtils_001 start"); EXPECT_EQ("", StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_INVALID)); EXPECT_EQ(GET_VARIABLE_NAME(STATS_TYPE_BLUETOOTH_BR_ON), StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_BLUETOOTH_BR_ON)); @@ -92,7 +92,7 @@ HWTEST_F (StatsUtilTest, StatsUtils_001, TestSize.Level0) StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_THERMAL)); EXPECT_EQ(GET_VARIABLE_NAME(STATS_TYPE_DISTRIBUTEDSCHEDULER), StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_DISTRIBUTEDSCHEDULER)); - STATS_HILOGI(LABEL_TEST, "StatsUtils_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsUtils_001 end"); } /** @@ -103,7 +103,7 @@ HWTEST_F (StatsUtilTest, StatsUtils_001, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsUtils_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsUtils_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsUtils_002 start"); EXPECT_EQ(GET_VARIABLE_NAME(STATS_TYPE_CAMERA_ON), StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_CAMERA_ON)); EXPECT_EQ(GET_VARIABLE_NAME(STATS_TYPE_CAMERA_FLASHLIGHT_ON), @@ -136,7 +136,7 @@ HWTEST_F (StatsUtilTest, StatsUtils_002, TestSize.Level0) StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_CPU_ACTIVE)); EXPECT_EQ(GET_VARIABLE_NAME(STATS_TYPE_CPU_SUSPEND), StatsUtils::ConvertStatsType(StatsUtils::StatsType::STATS_TYPE_CPU_SUSPEND)); - STATS_HILOGI(LABEL_TEST, "StatsUtils_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsUtils_002 end"); } /** @@ -147,7 +147,7 @@ HWTEST_F (StatsUtilTest, StatsUtils_002, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_001 start"); int64_t activeTimeMs = StatsUtils::DEFAULT_VALUE; int64_t devTimeMs = StatsUtils::DEFAULT_VALUE; std::shared_ptr timer = std::make_shared(); @@ -172,7 +172,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_001, TestSize.Level0) timer->Reset(); activeTimeMs = timer->GetRunningTimeMs(); EXPECT_EQ(activeTimeMs, StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsHelper_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_001 end"); } /** @@ -183,7 +183,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_001, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_002 start"); int64_t activeTimeMs = StatsUtils::DEFAULT_VALUE; int64_t devTimeMs = StatsUtils::DEFAULT_VALUE; std::shared_ptr timer = std::make_shared(); @@ -199,7 +199,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_002, TestSize.Level0) timer->Reset(); activeTimeMs = timer->GetRunningTimeMs(); EXPECT_EQ(activeTimeMs, StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsHelper_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_002 end"); } /** @@ -210,7 +210,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_002, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_003 start"); int64_t activeTimeMs = StatsUtils::DEFAULT_VALUE; int64_t devTimeMs = StatsUtils::DEFAULT_VALUE; std::shared_ptr timer = std::make_shared(); @@ -232,7 +232,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_003, TestSize.Level0) timer->Reset(); activeTimeMs = timer->GetRunningTimeMs(); EXPECT_EQ(activeTimeMs, StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsHelper_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_003 end"); } /** @@ -243,7 +243,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_003, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_004 start"); int64_t activeCount = StatsUtils::DEFAULT_VALUE; int64_t addCount = 20; std::shared_ptr counter = std::make_shared(); @@ -263,7 +263,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_004, TestSize.Level0) counter->Reset(); activeCount = counter->GetCount(); EXPECT_EQ(activeCount, StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsHelper_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_004 end"); } /** @@ -274,7 +274,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_004, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_005 start"); StatsHelper::SetOnBattery(false); EXPECT_FALSE(StatsHelper::IsOnBattery()); StatsHelper::SetScreenOff(false); @@ -296,7 +296,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_005, TestSize.Level0) EXPECT_TRUE(StatsHelper::IsOnBatteryScreenOff()); StatsHelper::SetScreenOff(false); - STATS_HILOGI(LABEL_TEST, "StatsHelper_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_005 end"); } /** @@ -307,7 +307,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_005, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsHelper_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsHelper_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_006 start"); int64_t timeMs = StatsUtils::DEFAULT_VALUE; int64_t durationTimeMs = StatsUtils::DEFAULT_VALUE; int64_t devTimeMs = StatsUtils::DEFAULT_VALUE; @@ -325,7 +325,7 @@ HWTEST_F (StatsUtilTest, StatsHelper_006, TestSize.Level0) durationTimeMs = abs(StatsHelper::GetOnBatteryUpTimeMs() - timeMs); devTimeMs = abs(durationTimeMs - TIMER_DURATION_MS); EXPECT_LE(devTimeMs, DEVIATION_TIMER_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsHelper_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsHelper_006 end"); } /** @@ -335,11 +335,11 @@ HWTEST_F (StatsUtilTest, StatsHelper_006, TestSize.Level0) */ HWTEST_F (StatsUtilTest, StatsParserTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 start"); auto parser = std::make_shared(); EXPECT_TRUE(parser != nullptr); bool ret = parser->Init(); EXPECT_TRUE(ret); - STATS_HILOGI(LABEL_TEST, "StatsParserTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsParserTest_001 end"); } } \ No newline at end of file diff --git a/test/unittest/src/clienttest/stats_wifi_test.cpp b/test/unittest/src/clienttest/stats_wifi_test.cpp index 55060fd..6af99b0 100644 --- a/test/unittest/src/clienttest/stats_wifi_test.cpp +++ b/test/unittest/src/clienttest/stats_wifi_test.cpp @@ -65,7 +65,7 @@ namespace { */ HWTEST_F (StatsWifiTest, StatsWifiTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_001 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -85,7 +85,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_001 end"); } /** @@ -96,7 +96,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_001, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_002 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -117,7 +117,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_002 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_002 is end"); } /** @@ -128,7 +128,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_002, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_003 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -148,7 +148,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_003, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_WIFI); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_003 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_003 is end"); } /** @@ -159,7 +159,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_003, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_004 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -187,7 +187,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_004 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_004 is end"); } /** @@ -198,7 +198,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_004, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_005 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -226,7 +226,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_005 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_005 is end"); } /** @@ -237,7 +237,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_005, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_006 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -257,7 +257,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_006 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_006 is end"); } /** @@ -268,7 +268,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_006, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_007 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -298,7 +298,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_007 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_007 is end"); } /** @@ -309,7 +309,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_007, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_008 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -329,7 +329,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_008 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_008 is end"); } /** @@ -340,7 +340,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_008, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_09, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_009 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -360,7 +360,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_09, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_009 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_009 is end"); } /** @@ -371,7 +371,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_09, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_010 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -392,7 +392,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_010 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_010 is end"); } /** @@ -403,7 +403,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_010, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_011 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -422,7 +422,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_011, TestSize.Level0) double actualPercent = statsClient.GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_WIFI); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_011 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_011 is end"); } /** @@ -433,7 +433,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_011, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_012 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -460,7 +460,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_012 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_012 is end"); } /** @@ -471,7 +471,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_012, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_013 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -487,7 +487,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_013, TestSize.Level0) long expectValue = StatsUtils::DEFAULT_VALUE; long data = statsClient.GetTotalDataBytes(StatsUtils::STATS_TYPE_WIFI_SCAN); EXPECT_EQ(data, expectValue); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_013 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_013 is end"); } /** @@ -498,7 +498,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_013, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_014 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -531,7 +531,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_014 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_014 is end"); } @@ -543,7 +543,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_014, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_015 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -572,7 +572,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); statsClient.SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_015 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_015 is end"); } /** @@ -583,7 +583,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_015, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_016 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -609,7 +609,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_016 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_016 is end"); } /** @@ -620,7 +620,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_016, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_017 is start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_017 is start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -634,7 +634,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_017, TestSize.Level0) for (int16_t i = 0; i < totalCount; i++) { auto ret = HiSysEventWrite(HiSysEvent::Domain::COMMUNICATION, StatsHiSysEvent::WIFI_SCAN, HiSysEvent::EventType::STATISTIC); - STATS_HILOGI(LABEL_TEST, "HiSysEventWrite return: %{public}d", ret); + STATS_HILOGD(LABEL_TEST, "HiSysEventWrite return: %{public}d", ret); usleep(POWER_CONSUMPTION_TRIGGERED_US); if (i == startDelayPos) { statsClient.SetOnBattery(false); @@ -652,7 +652,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_017, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_017 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_017 is end"); } /** @@ -663,7 +663,7 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_017, TestSize.Level0) */ HWTEST_F (StatsWifiTest, StatsWifiTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_018 start"); auto& statsClient = BatteryStatsClient::GetInstance(); EXPECT_TRUE(statsClient != nullptr); @@ -696,6 +696,6 @@ HWTEST_F (StatsWifiTest, StatsWifiTest_018, TestSize.Level0) actualPercent = statsClient.GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsWifiTest_018 is end"); + STATS_HILOGD(LABEL_TEST, "StatsWifiTest_018 is end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/mock/stats_service_test_mock_parcel.cpp b/test/unittest/src/servicetest/mock/stats_service_test_mock_parcel.cpp index 4730e5a..142a55f 100644 --- a/test/unittest/src/servicetest/mock/stats_service_test_mock_parcel.cpp +++ b/test/unittest/src/servicetest/mock/stats_service_test_mock_parcel.cpp @@ -54,7 +54,7 @@ namespace { */ HWTEST_F (StatsServiceTestMockParcel, StatsServiceTestMockParcel_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceTestMockParcel_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTestMockParcel_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); EXPECT_TRUE(g_statsServiceProxy->Reset()); EXPECT_TRUE(g_statsServiceProxy->SetOnBattery(true)); @@ -72,6 +72,6 @@ HWTEST_F (StatsServiceTestMockParcel, StatsServiceTestMockParcel_001, TestSize.L std::vector dumpArgs; dumpArgs.push_back("-batterystats"); EXPECT_EQ("remote error", g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size())); - STATS_HILOGI(LABEL_TEST, "StatsServiceTestMockParcel_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceTestMockParcel_001 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_alarm_test.cpp b/test/unittest/src/servicetest/stats_service_alarm_test.cpp index d8bf069..aff311c 100644 --- a/test/unittest/src/servicetest/stats_service_alarm_test.cpp +++ b/test/unittest/src/servicetest/stats_service_alarm_test.cpp @@ -78,7 +78,7 @@ namespace { */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -99,7 +99,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_001 end"); } /** @@ -110,7 +110,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -132,7 +132,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_002 end"); } /** @@ -143,7 +143,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -163,7 +163,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_003, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_003 end"); } /** @@ -174,7 +174,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -196,7 +196,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_004 end"); } /** @@ -207,7 +207,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -236,7 +236,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_005, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, alarmEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_ALARM)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, alarmEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_005 end"); } /** @@ -247,7 +247,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -273,7 +273,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_006 end"); } /** @@ -284,7 +284,7 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -302,6 +302,6 @@ HWTEST_F (StatsServiceAlarmTest, StatsServiceAlarmTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceAlarmTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAlarmTest_007 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_audio_test.cpp b/test/unittest/src/servicetest/stats_service_audio_test.cpp index 65cf6ac..3ef56d2 100644 --- a/test/unittest/src/servicetest/stats_service_audio_test.cpp +++ b/test/unittest/src/servicetest/stats_service_audio_test.cpp @@ -78,7 +78,7 @@ namespace { */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -102,7 +102,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_001 end"); } /** @@ -113,7 +113,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -138,7 +138,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_002 end"); } /** @@ -149,7 +149,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -172,7 +172,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_003, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_003 end"); } /** @@ -183,7 +183,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -226,7 +226,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_004 end"); } /** @@ -237,7 +237,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -272,7 +272,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_005 end"); } /** @@ -283,7 +283,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -327,7 +327,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_006, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_006 end"); } /** @@ -338,7 +338,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -370,7 +370,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_007, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, audioEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_AUDIO_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, audioEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_007 end"); } /** @@ -381,7 +381,7 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_007, TestSize.Level0) */ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -398,6 +398,6 @@ HWTEST_F (StatsServiceAudioTest, StatsServiceAudioTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceAudioTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceAudioTest_008 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_bluetooth_test.cpp b/test/unittest/src/servicetest/stats_service_bluetooth_test.cpp index 175be92..74e910c 100644 --- a/test/unittest/src/servicetest/stats_service_bluetooth_test.cpp +++ b/test/unittest/src/servicetest/stats_service_bluetooth_test.cpp @@ -120,7 +120,7 @@ namespace { */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -143,7 +143,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_001, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_001 end"); } /** @@ -154,7 +154,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_001, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -179,7 +179,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_002, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_002 end"); } /** @@ -190,7 +190,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_002, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -213,7 +213,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_003, TestSize.Lev double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_BLUETOOTH); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_003 end"); } /** @@ -224,7 +224,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_003, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -255,7 +255,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_004, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_004 end"); } /** @@ -266,7 +266,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_004, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -299,7 +299,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_005, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_005 end"); } /** @@ -310,7 +310,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_005, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -345,7 +345,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_006, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_006 end"); } /** @@ -356,7 +356,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_006, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -379,7 +379,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_007, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_007 end"); } /** @@ -390,7 +390,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_007, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -425,7 +425,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_008, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_008 end"); } /** @@ -436,7 +436,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_008, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -459,7 +459,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_009, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_009 end"); } /** @@ -470,7 +470,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_009, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -493,7 +493,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_010, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_010 end"); } /** @@ -504,7 +504,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_010, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -530,7 +530,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_011, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_011 end"); } /** @@ -541,7 +541,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_011, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -564,7 +564,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_012, TestSize.Lev double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_BLUETOOTH); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_012 end"); } /** @@ -575,7 +575,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_012, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_013 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -606,7 +606,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_013, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_013 end"); } /** @@ -617,7 +617,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_013, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_014 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -650,7 +650,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_014, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_014 end"); } /** @@ -661,7 +661,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_014, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_015 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -696,7 +696,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_015, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_015 end"); } /** @@ -707,7 +707,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_015, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_016 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -730,7 +730,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_016, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_016 end"); } /** @@ -741,7 +741,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_016, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_017 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -776,7 +776,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_017, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_017 end"); } /** @@ -787,7 +787,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_017, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_018 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -810,7 +810,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_018, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_018 end"); } /** @@ -821,7 +821,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_018, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_019 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -845,7 +845,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_019, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_019 end"); } /** @@ -856,7 +856,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_019, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_020, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_020 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_020 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -881,7 +881,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_020, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_020 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_020 end"); } /** @@ -892,7 +892,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_020, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_021, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_021 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_021 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -915,7 +915,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_021, TestSize.Lev double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_021 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_021 end"); } /** @@ -926,7 +926,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_021, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_022, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_022 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_022 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -959,7 +959,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_022, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_022 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_022 end"); } /** @@ -970,7 +970,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_022, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_023, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_023 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_023 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1004,7 +1004,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_023, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_023 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_023 end"); } /** @@ -1015,7 +1015,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_023, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_024, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_024 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_024 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1038,7 +1038,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_024, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_024 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_024 end"); } /** @@ -1049,7 +1049,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_024, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_025, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_025 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_025 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1084,7 +1084,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_025, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_025 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_025 end"); } /** @@ -1095,7 +1095,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_025, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_026, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_026 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_026 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1118,7 +1118,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_026, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_026 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_026 end"); } /** @@ -1129,7 +1129,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_026, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_027, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_027 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_027 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1171,7 +1171,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_027, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption Two = " << expectedPowerTwo << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption Two = " << actualPowerTwo << " mAh"; EXPECT_LE(devPrecentTwo, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_027 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_027 end"); } /** @@ -1182,7 +1182,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_027, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_028, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_028 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_028 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1204,7 +1204,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_028, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_028 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_028 end"); } /** @@ -1215,7 +1215,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_028, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_029, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_029 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_029 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1238,7 +1238,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_029, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_029 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_029 end"); } /** @@ -1249,7 +1249,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_029, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_030, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_030 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_030 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1270,7 +1270,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_030, TestSize.Lev double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_030 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_030 end"); } /** @@ -1281,7 +1281,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_030, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_031, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_031 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_031 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1312,7 +1312,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_031, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_031 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_031 end"); } /** @@ -1323,7 +1323,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_031, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_032, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_032 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_032 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1344,7 +1344,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_032, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_032 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_032 end"); } /** @@ -1355,7 +1355,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_032, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_033, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_033 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_033 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1395,7 +1395,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_033, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption Two = " << expectedPowerTwo << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption Two = " << actualPowerTwo << " mAh"; EXPECT_LE(devPrecentTwo, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_033 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_033 end"); } /** @@ -1406,7 +1406,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_033, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_034, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_034 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_034 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1434,7 +1434,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_034, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected soft consumption = " << expectedSoftPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual soft consumption = " << actualSoftPower << " mAh"; EXPECT_LE(devPrecentSoft, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_034 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_034 end"); } /** @@ -1445,7 +1445,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_034, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_035, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_035 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_035 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1468,7 +1468,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_035, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": actual soft consumption = " << actualSoftPower << " mAh"; EXPECT_EQ(expectedPower, actualSoftPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_035 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_035 end"); } /** @@ -1479,7 +1479,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_035, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_036, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_036 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_036 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1508,7 +1508,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_036, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_036 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_036 end"); } /** @@ -1519,7 +1519,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_036, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_037, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_037 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_037 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1557,7 +1557,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_037, TestSize.Lev EXPECT_EQ(StatsUtils::DEFAULT_VALUE, bluetoothEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_BLUETOOTH_BR_SCAN)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, bluetoothEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_BLUETOOTH_BLE_SCAN)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, bluetoothEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_037 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_037 end"); } /** @@ -1568,7 +1568,7 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_037, TestSize.Lev */ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_038, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_038 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_038 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -1609,6 +1609,6 @@ HWTEST_F (StatsServiceBluetoothTest, StatsServiceBluetoothTest_038, TestSize.Lev GTEST_LOG_(INFO) << __func__ << ": expected soft consumption = " << expectedSoftPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual soft consumption = " << actualSoftPower << " mAh"; EXPECT_EQ(expectedSoftPower, actualSoftPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceBluetoothTest_038 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceBluetoothTest_038 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_camera_test.cpp b/test/unittest/src/servicetest/stats_service_camera_test.cpp index 9abe8e0..8a1f85e 100644 --- a/test/unittest/src/servicetest/stats_service_camera_test.cpp +++ b/test/unittest/src/servicetest/stats_service_camera_test.cpp @@ -78,7 +78,7 @@ namespace { */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -101,7 +101,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_001 end"); } /** @@ -112,7 +112,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -136,7 +136,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_002 end"); } /** @@ -147,7 +147,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -168,7 +168,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_003, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_003 end"); } /** @@ -179,7 +179,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -208,7 +208,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_004 end"); } /** @@ -219,7 +219,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -251,7 +251,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_005 end"); } /** @@ -262,7 +262,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -290,7 +290,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_006, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_006 end"); } /** @@ -301,7 +301,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -332,7 +332,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_007 end"); } /** @@ -343,7 +343,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_007, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -375,7 +375,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_008 end"); } /** @@ -386,7 +386,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_008, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -416,7 +416,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_009, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_009 end"); } /** @@ -427,7 +427,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_009, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -460,7 +460,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_010 end"); } /** @@ -471,7 +471,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_010, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -505,7 +505,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_011, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_011 end"); } /** @@ -516,7 +516,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_011, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -532,7 +532,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_012, TestSize.Level0) double actualPower = g_statsServiceProxy->GetAppStatsMah(uid); GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_TRUE(actualPower >= StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_012 end"); } /** @@ -543,7 +543,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_012, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_013 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -573,7 +573,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_013 end"); } /** @@ -584,7 +584,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_013, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_014 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -608,7 +608,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_014 end"); } /** @@ -619,7 +619,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_014, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_015 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -644,7 +644,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_015 end"); } /** @@ -655,7 +655,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_015, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_016 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -677,7 +677,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_016, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_016 end"); } /** @@ -688,7 +688,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_016, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_017 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -730,7 +730,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_017, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_017 end"); } /** @@ -741,7 +741,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_017, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_018 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -783,7 +783,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_018, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_018 end"); } /** @@ -794,7 +794,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_018, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_019 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -825,7 +825,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_019, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, cameraEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_CAMERA_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, cameraEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_019 end"); } /** @@ -836,7 +836,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_019, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_020, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_020 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_020 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -868,7 +868,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_020, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, flashlightEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_FLASHLIGHT_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, flashlightEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_020 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_020 end"); } /** @@ -879,7 +879,7 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_020, TestSize.Level0) */ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_021, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_021 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_021 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -902,6 +902,6 @@ HWTEST_F (StatsServiceCameraTest, StatsServiceCameraTest_021, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceCameraTest_021 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCameraTest_021 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_core_test.cpp b/test/unittest/src/servicetest/stats_service_core_test.cpp index 58f2d3e..5b60649 100644 --- a/test/unittest/src/servicetest/stats_service_core_test.cpp +++ b/test/unittest/src/servicetest/stats_service_core_test.cpp @@ -62,7 +62,7 @@ namespace { */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_001 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); EXPECT_EQ(nullptr, statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_INVALID)); @@ -81,7 +81,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_001, TestSize.Level0) EXPECT_NE(nullptr, statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_CPU)); EXPECT_NE(nullptr, statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_WAKELOCK)); EXPECT_NE(nullptr, statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_ALARM)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_001 end"); } /** @@ -92,7 +92,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_002 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); statsService->SetOnBattery(true); @@ -111,7 +111,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_002, TestSize.Level0) EXPECT_GT(wifiEntity->GetActiveTimeMs(StatsUtils::STATS_TYPE_WIFI_ON), ((2 * SERVICE_POWER_CONSUMPTION_DURATION_US) / 3) * 2 / US_PER_MS); statsService->SetOnBattery(false); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_002 end"); } /** @@ -122,7 +122,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_003 start"); std::shared_ptr statsCore = std::make_shared(); std::string expectedDebugInfo; expectedDebugInfo.append("BATTERY STATS DUMP:\n").append("\n"); @@ -130,7 +130,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_003, TestSize.Level0) statsCore->DumpInfo(actualDebugInfo); auto index = actualDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(index != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_003 end"); } /** @@ -141,7 +141,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_004 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); int32_t uid = 1003; @@ -191,7 +191,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_004, TestSize.Level0) BatteryStatsInfo::CONSUMPTION_TYPE_GNSS)->GetEntityPowerMah()); EXPECT_EQ(nullptr, statsCore->GetEntity( BatteryStatsInfo::CONSUMPTION_TYPE_GNSS)->GetOrCreateTimer(uid, StatsUtils::STATS_TYPE_INVALID)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_004 end"); } /** @@ -202,7 +202,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_005 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); int32_t uid = 1003; @@ -242,7 +242,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_005, TestSize.Level0) BatteryStatsInfo::CONSUMPTION_TYPE_WIFI)->GetConsumptionCount(StatsUtils::STATS_TYPE_INVALID)); EXPECT_EQ(nullptr, statsCore->GetEntity( BatteryStatsInfo::CONSUMPTION_TYPE_WIFI)->GetOrCreateCounter(StatsUtils::STATS_TYPE_INVALID)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_005 end"); } /** @@ -253,7 +253,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_006 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); auto cpuEntity = statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_CPU); @@ -273,7 +273,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_006, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, idleEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_PHONE_IDLE)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, idleEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_CPU_SUSPEND)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, idleEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_006 end"); } /** @@ -284,7 +284,7 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_007 start"); auto statsService = BatteryStatsService::GetInstance(); auto statsCore = statsService->GetBatteryStatsCore(); auto uidEntity = statsCore->GetEntity(BatteryStatsInfo::CONSUMPTION_TYPE_APP); @@ -305,6 +305,6 @@ HWTEST_F (StatsServiceCoreTest, StatsServiceCoreTest_007, TestSize.Level0) EXPECT_EQ(StatsUtils::DEFAULT_VALUE, uidEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_CPU_ACTIVE)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, uidEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_ALARM)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, uidEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID)); - STATS_HILOGI(LABEL_TEST, "StatsServiceCoreTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceCoreTest_007 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_display_test.cpp b/test/unittest/src/servicetest/stats_service_display_test.cpp index fed3ee9..531bbdb 100644 --- a/test/unittest/src/servicetest/stats_service_display_test.cpp +++ b/test/unittest/src/servicetest/stats_service_display_test.cpp @@ -105,7 +105,7 @@ namespace { */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -131,7 +131,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_001 end"); } /** @@ -142,7 +142,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -169,7 +169,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_002 end"); } /** @@ -180,7 +180,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -210,7 +210,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_003, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_003 end"); } /** @@ -221,7 +221,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -246,7 +246,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_004, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_SCREEN); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_004 end"); } /** @@ -257,7 +257,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -293,7 +293,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_005 end"); } /** @@ -304,7 +304,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -333,7 +333,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_006 end"); } /** @@ -344,7 +344,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -381,7 +381,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_007 end"); } /** @@ -392,7 +392,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_007, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -409,7 +409,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_008 end"); } /** @@ -420,7 +420,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_008, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -454,7 +454,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_009 end"); } /** @@ -465,7 +465,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_009, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -501,7 +501,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_010 end"); } /** @@ -512,7 +512,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_010, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -549,7 +549,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_011, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_011 end"); } /** @@ -560,7 +560,7 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_011, TestSize.Level0) */ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -578,6 +578,6 @@ HWTEST_F (StatsServiceDisplayTest, StatsServiceDisplayTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceDisplayTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDisplayTest_012 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_dump_test.cpp b/test/unittest/src/servicetest/stats_service_dump_test.cpp index a2faa85..fd61e6d 100644 --- a/test/unittest/src/servicetest/stats_service_dump_test.cpp +++ b/test/unittest/src/servicetest/stats_service_dump_test.cpp @@ -84,7 +84,7 @@ namespace { */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -115,7 +115,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_001, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_001 end"); } /** @@ -126,7 +126,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -169,7 +169,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_002, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_002 end"); } /** @@ -180,7 +180,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -210,7 +210,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_003, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_003 end"); } /** @@ -221,7 +221,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -262,7 +262,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_004, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_004 end"); } /** @@ -273,7 +273,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -307,7 +307,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_005, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_005 end"); } /** @@ -318,7 +318,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -360,7 +360,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_006, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_006 end"); } /** @@ -371,7 +371,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -412,7 +412,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_007, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_007 end"); } /** @@ -423,7 +423,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_007, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -461,7 +461,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_008, TestSize.Level0) std::string actualMissInfo = g_statsServiceProxy->ShellDump(dumpArgs, dumpArgs.size()); auto missIndex = actualMissInfo.find(expectedMissInfo); EXPECT_TRUE(missIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_008 end"); } /** @@ -472,7 +472,7 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_008, TestSize.Level0) */ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -491,6 +491,6 @@ HWTEST_F (StatsServiceDumpTest, StatsServiceDumpTest_009, TestSize.Level0) std::string helpDebugInfo = g_statsServiceProxy->ShellDump(dumpArgsHelp, dumpArgsHelp.size()); auto helpIndex = helpDebugInfo.find(expectedDebugInfo); EXPECT_TRUE(helpIndex != string::npos); - STATS_HILOGI(LABEL_TEST, "StatsServiceDumpTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceDumpTest_009 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_location_test.cpp b/test/unittest/src/servicetest/stats_service_location_test.cpp index f7752b1..a126cd2 100644 --- a/test/unittest/src/servicetest/stats_service_location_test.cpp +++ b/test/unittest/src/servicetest/stats_service_location_test.cpp @@ -78,7 +78,7 @@ namespace { */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -102,7 +102,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_001, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_001 end"); } /** @@ -113,7 +113,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_001, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -138,7 +138,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_002, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_002 end"); } /** @@ -149,7 +149,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_002, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -172,7 +172,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_003, TestSize.Level double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_003 end"); } /** @@ -183,7 +183,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_003, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -216,7 +216,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_004, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_004 end"); } /** @@ -227,7 +227,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_004, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -250,7 +250,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_005, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_005 end"); } /** @@ -261,7 +261,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_005, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -296,7 +296,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_006, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_006 end"); } /** @@ -307,7 +307,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_006, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -330,7 +330,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_007, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_007 end"); } /** @@ -341,7 +341,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_007, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -383,7 +383,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_008, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected second uid consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual second uid consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_008 end"); } /** @@ -394,7 +394,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_008, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -419,7 +419,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_009, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_009 end"); } /** @@ -430,7 +430,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_009, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -459,7 +459,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_010, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_010 end"); } /** @@ -470,7 +470,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_010, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -502,7 +502,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_011, TestSize.Level EXPECT_EQ(StatsUtils::DEFAULT_VALUE, gnssEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_GNSS_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, gnssEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_011 end"); } /** @@ -513,7 +513,7 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_011, TestSize.Level */ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -530,6 +530,6 @@ HWTEST_F (StatsServiceLocationTest, StatsServiceLocationTest_012, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceLocationTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceLocationTest_012 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_phone_test.cpp b/test/unittest/src/servicetest/stats_service_phone_test.cpp index 8d69b64..55279f4 100644 --- a/test/unittest/src/servicetest/stats_service_phone_test.cpp +++ b/test/unittest/src/servicetest/stats_service_phone_test.cpp @@ -80,7 +80,7 @@ namespace { */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -102,7 +102,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_001 end"); } /** @@ -113,7 +113,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_001, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -138,7 +138,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_002 end"); } /** @@ -149,7 +149,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_002, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -170,7 +170,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_003, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_PHONE); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_003 end"); } /** @@ -181,7 +181,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_003, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -211,7 +211,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_004 end"); } /** @@ -222,7 +222,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_004, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -254,7 +254,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_005 end"); } /** @@ -265,7 +265,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_005, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -299,7 +299,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_006 end"); } /** @@ -310,7 +310,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_006, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -331,7 +331,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_007 end"); } /** @@ -342,7 +342,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_007, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -376,7 +376,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_008 end"); } /** @@ -387,7 +387,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_008, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -409,7 +409,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_009 end"); } /** @@ -420,7 +420,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_009, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -444,7 +444,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_010 end"); } /** @@ -455,7 +455,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_010, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -476,7 +476,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_011, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_PHONE); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_011 end"); } /** @@ -487,7 +487,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_011, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -517,7 +517,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_012 end"); } /** @@ -528,7 +528,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_012, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_013 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -560,7 +560,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_013, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_013 end"); } /** @@ -571,7 +571,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_013, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_014 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -592,7 +592,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_014 end"); } /** @@ -603,7 +603,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_014, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_015 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -639,7 +639,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_015 end"); } /** @@ -650,7 +650,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_015, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_016 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -695,7 +695,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_016 end"); } /** @@ -766,7 +766,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_017, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_018 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -799,7 +799,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_018, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_018 end"); } /** @@ -810,7 +810,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_018, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_019 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -838,7 +838,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_019, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_019 end"); } /** @@ -849,7 +849,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_019, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_020, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_020 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_020 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -894,7 +894,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_020, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_020 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_020 end"); } /** @@ -905,7 +905,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_020, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_021, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_021 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_021 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -926,7 +926,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_021, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_021 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_021 end"); } /** @@ -937,7 +937,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_021, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_022, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_022 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_022 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -958,7 +958,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_022, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_022 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_022 end"); } /** @@ -969,7 +969,7 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_022, TestSize.Level0) */ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_023, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_023 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_023 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -991,6 +991,6 @@ HWTEST_F (StatsServicePhoneTest, StatsServicePhoneTest_023, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServicePhoneTest_023 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePhoneTest_023 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_powermgr_test.cpp b/test/unittest/src/servicetest/stats_service_powermgr_test.cpp index 6a936ab..4f8696f 100644 --- a/test/unittest/src/servicetest/stats_service_powermgr_test.cpp +++ b/test/unittest/src/servicetest/stats_service_powermgr_test.cpp @@ -84,7 +84,7 @@ namespace { */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -107,7 +107,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_001, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_001 end"); } /** @@ -118,7 +118,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_001, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -143,7 +143,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_002, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_002 end"); } /** @@ -154,7 +154,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_002, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -176,7 +176,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_003, TestSize.Level double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_003 end"); } /** @@ -187,7 +187,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_003, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -230,7 +230,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_004, TestSize.Level double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_004 end"); } /** @@ -241,7 +241,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_004, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -264,7 +264,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_005, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_005 end"); } /** @@ -275,7 +275,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_005, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -300,7 +300,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_006, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_006 end"); } /** @@ -311,7 +311,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_006, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -333,7 +333,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_007, TestSize.Level double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_007 end"); } /** @@ -344,7 +344,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_007, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -387,7 +387,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_008, TestSize.Level double actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_008 end"); } /** @@ -398,7 +398,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_008, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -442,7 +442,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_009, TestSize.Level EXPECT_EQ(StatsUtils::DEFAULT_VALUE, sensorEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_SENSOR_GRAVITY_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, sensorEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_SENSOR_PROXIMITY_ON)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, sensorEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_009 end"); } /** @@ -454,7 +454,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_009, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -488,7 +488,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_010, TestSize.Leve EXPECT_EQ(StatsUtils::DEFAULT_VALUE, wakelockEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_WAKELOCK_HOLD)); EXPECT_EQ(StatsUtils::DEFAULT_VALUE, wakelockEntity->GetStatsPowerMah(StatsUtils::STATS_TYPE_INVALID, uid)); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_010 end"); } /** @@ -499,7 +499,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_010, TestSize.Leve */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -523,7 +523,7 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_011, TestSize.Level GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_011 end"); } /** @@ -534,14 +534,14 @@ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_011, TestSize.Level */ HWTEST_F (StatsServicePowerMgrTest, StatsServicePowerMgrTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_012 start"); auto statsService = BatteryStatsService::GetInstance(); EXPECT_TRUE(statsService != nullptr); statsService->OnStart(); statsService->RegisterBootCompletedCallback(); statsService->OnStop(); statsService->DestroyInstance(); - STATS_HILOGI(LABEL_TEST, "StatsServicePowerMgrTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServicePowerMgrTest_012 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_stub_test.cpp b/test/unittest/src/servicetest/stats_service_stub_test.cpp index 12feebf..2b4592b 100644 --- a/test/unittest/src/servicetest/stats_service_stub_test.cpp +++ b/test/unittest/src/servicetest/stats_service_stub_test.cpp @@ -39,7 +39,7 @@ namespace { */ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_001 start"); sptr statsService = BatteryStatsService::GetInstance(); sptr statsStub = static_cast>(statsService); @@ -51,7 +51,7 @@ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_001, TestSize.Level0) static_cast(PowerMgr::BatteryStatsInterfaceCode::BATTERY_STATS_GET), data, reply, option); EXPECT_EQ(ret, E_STATS_GET_SERVICE_FAILED); - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_001 end"); } /** @@ -62,7 +62,7 @@ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_002 start"); sptr statsService = BatteryStatsService::GetInstance(); sptr statsStub = static_cast>(statsService); @@ -75,7 +75,7 @@ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_002, TestSize.Level0) static_cast(PowerMgr::BatteryStatsInterfaceCode::BATTERY_STATS_GET) + 100; int ret = statsStub->OnRemoteRequest(invalidCode, data, reply, option); EXPECT_NE(ret, ERR_OK); - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_002 end"); } /** @@ -86,7 +86,7 @@ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_003 start."); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_003 start."); MessageParcel data; MessageParcel reply; MessageOption option; @@ -105,6 +105,6 @@ HWTEST_F (StatsServiceStubTest, StatsServiceStubTest_003, TestSize.Level0) data.WriteString(""); ret = statsStub->OnRemoteRequest(code, data, reply, option); EXPECT_EQ(ret, E_STATS_READ_PARCEL_ERROR) << " ret:" << ret; - STATS_HILOGI(LABEL_TEST, "StatsServiceStubTest_003 end."); + STATS_HILOGD(LABEL_TEST, "StatsServiceStubTest_003 end."); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_subscriber_test.cpp b/test/unittest/src/servicetest/stats_service_subscriber_test.cpp index bede3d1..073cab9 100644 --- a/test/unittest/src/servicetest/stats_service_subscriber_test.cpp +++ b/test/unittest/src/servicetest/stats_service_subscriber_test.cpp @@ -110,7 +110,7 @@ namespace { */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -133,7 +133,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_001, TestSize.L GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_001 end"); } /** @@ -144,7 +144,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_001, TestSize.L */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -179,7 +179,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_002, TestSize.L GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_002 end"); } /** @@ -190,7 +190,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_002, TestSize.L */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -216,7 +216,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_003, TestSize.L GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_003 end"); } /** @@ -227,7 +227,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_003, TestSize.L */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -276,7 +276,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_004, TestSize.L GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_004 end"); } /** @@ -287,7 +287,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_004, TestSize.L */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -315,7 +315,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_005, TestSize.L GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_005 end"); } /** @@ -326,7 +326,7 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_005, TestSize.L */ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -362,6 +362,6 @@ HWTEST_F (StatsServiceSubscriberTest, StatsServiceSubscriberTest_006, TestSize.L GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceSubscriberTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceSubscriberTest_006 end"); } } \ No newline at end of file diff --git a/test/unittest/src/servicetest/stats_service_wifi_test.cpp b/test/unittest/src/servicetest/stats_service_wifi_test.cpp index 7c7a505..52eb841 100644 --- a/test/unittest/src/servicetest/stats_service_wifi_test.cpp +++ b/test/unittest/src/servicetest/stats_service_wifi_test.cpp @@ -79,7 +79,7 @@ namespace { */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_001, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_001 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_001 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -100,7 +100,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_001, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_001 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_001 end"); } /** @@ -111,7 +111,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_001, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_002, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_002 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_002 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -133,7 +133,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_002, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_002 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_002 end"); } /** @@ -144,7 +144,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_002, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_003, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_003 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_003 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -165,7 +165,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_003, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_WIFI); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_003 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_003 end"); } /** @@ -176,7 +176,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_003, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_004, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_004 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_004 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -205,7 +205,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_004, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_004 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_004 end"); } /** @@ -216,7 +216,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_004, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_005, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_005 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_005 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -247,7 +247,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_005, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_005 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_005 end"); } /** @@ -258,7 +258,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_005, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_006, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_006 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_006 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -279,7 +279,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_006, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_006 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_006 end"); } /** @@ -290,7 +290,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_006, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_007, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_007 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_007 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -323,7 +323,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_007, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_007 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_007 end"); } /** @@ -334,7 +334,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_007, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_008, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_008 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_008 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -355,7 +355,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_008, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected time = " << expectedTime << " seconds"; GTEST_LOG_(INFO) << __func__ << ": actual time = " << actualTime << " seconds"; EXPECT_EQ(expectedTime, actualTime); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_008 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_008 end"); } /** @@ -366,7 +366,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_008, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_009, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_009 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_009 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -384,7 +384,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_009, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": before consumption = " << powerMahBefore << " mAh"; GTEST_LOG_(INFO) << __func__ << ": after consumption = " << powerMahAfter << " mAh"; EXPECT_TRUE(powerMahBefore >= StatsUtils::DEFAULT_VALUE && powerMahAfter == StatsUtils::DEFAULT_VALUE); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_009 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_009 end"); } /** @@ -395,7 +395,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_009, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_010, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_010 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_010 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -414,7 +414,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_010, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_010 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_010 end"); } /** @@ -425,7 +425,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_010, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_011, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_011 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_011 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -442,7 +442,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_011, TestSize.Level0) double actualPercent = g_statsServiceProxy->GetPartStatsPercent(BatteryStatsInfo::CONSUMPTION_TYPE_WIFI); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_011 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_011 end"); } /** @@ -453,7 +453,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_011, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_012, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_012 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_012 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -478,7 +478,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_012, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_012 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_012 end"); } /** @@ -489,7 +489,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_012, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_013, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_013 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_013 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -503,7 +503,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_013, TestSize.Level0) long expectValue = StatsUtils::DEFAULT_VALUE; long data = g_statsServiceProxy->GetTotalDataBytes(StatsUtils::STATS_TYPE_WIFI_SCAN); EXPECT_EQ(data, expectValue); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_013 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_013 end"); } /** @@ -514,7 +514,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_013, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_014, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_014 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_014 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -547,7 +547,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_014, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_014 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_014 end"); } /** @@ -558,7 +558,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_014, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_015, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_015 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_015 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -587,7 +587,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_015, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); g_statsServiceProxy->SetOnBattery(true); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_015 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_015 end"); } /** @@ -598,7 +598,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_015, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_016, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_016 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_016 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -625,7 +625,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_016, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_016 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_016 end"); } /** @@ -636,7 +636,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_016, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_017, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_017 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_017 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -663,7 +663,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_017, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_LE(devPrecent, DEVIATION_PERCENT_THRESHOLD); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_017 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_017 end"); } /** @@ -674,7 +674,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_017, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_018, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_018 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_018 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -710,7 +710,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_018, TestSize.Level0) actualPercent = g_statsServiceProxy->GetAppStatsPercent(uid); GTEST_LOG_(INFO) << __func__ << ": actual percent = " << actualPercent; EXPECT_TRUE(actualPercent >= zeroPercent && actualPercent <= fullPercent); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_018 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_018 end"); } /** @@ -721,7 +721,7 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_018, TestSize.Level0) */ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_019, TestSize.Level0) { - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_019 start"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_019 start"); ASSERT_NE(g_statsServiceProxy, nullptr); auto statsService = BatteryStatsService::GetInstance(); g_statsServiceProxy->Reset(); @@ -737,6 +737,6 @@ HWTEST_F (StatsServiceWifiTest, StatsServiceWifiTest_019, TestSize.Level0) GTEST_LOG_(INFO) << __func__ << ": expected consumption = " << expectedPower << " mAh"; GTEST_LOG_(INFO) << __func__ << ": actual consumption = " << actualPower << " mAh"; EXPECT_EQ(expectedPower, actualPower); - STATS_HILOGI(LABEL_TEST, "StatsServiceWifiTest_019 end"); + STATS_HILOGD(LABEL_TEST, "StatsServiceWifiTest_019 end"); } } \ No newline at end of file -- Gitee