From 8485654827de7c116f12a5c706f8d28fd844d7e1 Mon Sep 17 00:00:00 2001 From: lokilee73 Date: Thu, 5 Jul 2018 17:46:20 +0900 Subject: Add omitted gtest cases get_frame_rate for LCD and free_gadget for USB Client Change-Id: Ia898bbb31255b015bf8076dcd445c8cc4dcbda02 Signed-off-by: lokilee73 --- unittest/gtest_hal_display.cpp | 12 ++++++++++++ unittest/gtest_hal_usb_client.cpp | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/unittest/gtest_hal_display.cpp b/unittest/gtest_hal_display.cpp index 98e71cb..bb21cb2 100755 --- a/unittest/gtest_hal_display.cpp +++ b/unittest/gtest_hal_display.cpp @@ -163,6 +163,18 @@ TEST_F(DISPLAYHalTest, GetMinFrameRateP) EXPECT_GE(ret, 0) << "Fail to get_min_frame_rate (" << ret << ")"; } +TEST_F(DISPLAYHalTest, GetFrameRateP) +{ + int ret, rate; + + if (!display_dev || !display_dev->get_frame_rate) { + cout << "There is no function for get_frame_rate" << endl; + return; + } + ret = display_dev->get_frame_rate(&rate); + EXPECT_GE(ret, 0) << "Fail to get frame rate (" << ret << ")"; +} + TEST_F(DISPLAYHalTest, SetFrameRateP) { int ret; diff --git a/unittest/gtest_hal_usb_client.cpp b/unittest/gtest_hal_usb_client.cpp index 9686d6a..3859030 100755 --- a/unittest/gtest_hal_usb_client.cpp +++ b/unittest/gtest_hal_usb_client.cpp @@ -199,6 +199,18 @@ TEST_F(USBCLIENTHalTest, DisableP) EXPECT_EQ(ret, 0) << "Fail to disable (" << ret << ")"; } +TEST_F(USBCLIENTHalTest, FreeGadgetP) +{ + if (!supported) + return; + + if (!client_dev || !client_dev->free_gadget) { + cout << "There is no function for free_gadget" << endl; + return; + } + client_dev->free_gadget(gadget_dev); +} + TEST_F(USBCLIENTHalTest, DeinitP) { int ret; -- cgit v1.2.3