From 3df4cb828e94d86a76a8af1858b4c0a348d2a40b Mon Sep 17 00:00:00 2001 From: lokilee73 Date: Tue, 21 Aug 2018 14:30:04 +0900 Subject: [PATCH] Rename deprecated function, updated_cb for battery, thermal and extcon Change-Id: I92d16c3233894a5e662126eee32bdc5fdce5a890 Signed-off-by: lokilee73 --- unittest/device_haltests.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/unittest/device_haltests.cpp b/unittest/device_haltests.cpp index 175049f..9d0cb37 100755 --- a/unittest/device_haltests.cpp +++ b/unittest/device_haltests.cpp @@ -221,7 +221,7 @@ TEST_F(BATTERYHalTest, InitP) EXPECT_EQ(ret, 0) << "Fail to open battery device(" << ret << ")"; } -static void updated_cb(struct battery_info *info, void *data) +static void battery_updated_cb(struct battery_info *info, void *data) { } @@ -237,7 +237,7 @@ TEST_F(BATTERYHalTest, RegisterChangedEventP) cout << "There is no function for register_changed_event" << endl; return; } - ret = battery_dev->register_changed_event(updated_cb, NULL); + ret = battery_dev->register_changed_event(battery_updated_cb, NULL); EXPECT_EQ(ret, 0) << "Fail to register_changed_event (" << ret << ")"; } @@ -250,7 +250,7 @@ TEST_F(BATTERYHalTest, UnregisterChangedEventP) cout << "There is no function for unregister_changed_event" << endl; return; } - battery_dev->unregister_changed_event(updated_cb); + battery_dev->unregister_changed_event(battery_updated_cb); } TEST_F(BATTERYHalTest, GetCurrentStateP) @@ -264,7 +264,7 @@ TEST_F(BATTERYHalTest, GetCurrentStateP) cout << "There is no function for get_current_state" << endl; return; } - ret = battery_dev->get_current_state(updated_cb, NULL); + ret = battery_dev->get_current_state(battery_updated_cb, NULL); EXPECT_EQ(ret, 0) << "Fail to get_current_state (" << ret << ")"; } @@ -550,7 +550,7 @@ TEST_F(EXTCONHalTest, InitP) EXPECT_EQ(ret, 0) << "Fail to open extcon device(" << ret << ")"; } -static void updated_cb(struct connection_info *info, void *data) +static void extcon_updated_cb(struct connection_info *info, void *data) { } @@ -563,7 +563,7 @@ TEST_F(EXTCONHalTest, RegisterChangedEventP) cout << "There is no function for register_changed_event" << endl; return; } - ret = ext_dev->register_changed_event(updated_cb, NULL); + ret = ext_dev->register_changed_event(extcon_updated_cb, NULL); EXPECT_EQ(ret, 0) << "Fail to register_changed_event (" << ret << ")"; } @@ -573,7 +573,7 @@ TEST_F(EXTCONHalTest, UnregisterChangedEventP) cout << "There is no function for unregister_changed_event" << endl; return; } - ext_dev->unregister_changed_event(updated_cb); + ext_dev->unregister_changed_event(extcon_updated_cb); } TEST_F(EXTCONHalTest, GetCurrentStateP) @@ -584,7 +584,7 @@ TEST_F(EXTCONHalTest, GetCurrentStateP) cout << "There is no function for unregister_changed_event" << endl; return; } - ret = ext_dev->get_current_state(updated_cb, NULL); + ret = ext_dev->get_current_state(extcon_updated_cb, NULL); EXPECT_EQ(ret, 0) << "Fail to unregister_changed_event (" << ret << ")"; } @@ -764,7 +764,7 @@ TEST_F(THERMALHalTest, GetStateP) EXPECT_EQ(ret, 0) << "Fail to get_state (" << ret << ")"; } -static void updated_cb(struct thermal_info *info, void *data) +static void thermal_updated_cb(struct thermal_info *info, void *data) { } @@ -777,7 +777,7 @@ TEST_F(THERMALHalTest, RegisterChangedEventP) cout << "There is no function for register_changed_event" << endl; return; } - ret = thermal_dev->register_changed_event(updated_cb, NULL); + ret = thermal_dev->register_changed_event(thermal_updated_cb, NULL); EXPECT_EQ(ret, 0) << "Fail to register_changed_event (" << ret << ")"; } @@ -787,7 +787,7 @@ TEST_F(THERMALHalTest, UnregisterChangedEventP) cout << "There is no function for unregister_changed_event" << endl; return; } - thermal_dev->unregister_changed_event(updated_cb); + thermal_dev->unregister_changed_event(thermal_updated_cb); } TEST_F(THERMALHalTest, DeinitP) -- 2.7.4