Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8542b28 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Android (Google) Code Review
Browse files

Merge "Set skipSubChannel both to true and false when testing scan and step methods."

parents af5b837f a8dec0f9
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -454,6 +454,7 @@ TEST_F(BroadcastRadioHidlTest, SetConfigurationFails) {
 *  - the HAL implements the method
 *  - the HAL implements the method
 *  - the method returns 0 (no error)
 *  - the method returns 0 (no error)
 *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
 *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
 *  - skipping sub-channel or not does not fail the call
 */
 */
TEST_F(BroadcastRadioHidlTest, Scan) {
TEST_F(BroadcastRadioHidlTest, Scan) {
    ASSERT_EQ(true, openTuner());
    ASSERT_EQ(true, openTuner());
@@ -467,7 +468,7 @@ TEST_F(BroadcastRadioHidlTest, Scan) {


    // test scan DOWN
    // test scan DOWN
    mCallbackCalled = false;
    mCallbackCalled = false;
    hidlResult = mTuner->scan(Direction::DOWN, true);
    hidlResult = mTuner->scan(Direction::DOWN, false);
    EXPECT_TRUE(hidlResult.isOk());
    EXPECT_TRUE(hidlResult.isOk());
    EXPECT_EQ(Result::OK, hidlResult);
    EXPECT_EQ(Result::OK, hidlResult);
    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
@@ -480,13 +481,14 @@ TEST_F(BroadcastRadioHidlTest, Scan) {
 *  - the HAL implements the method
 *  - the HAL implements the method
 *  - the method returns 0 (no error)
 *  - the method returns 0 (no error)
 *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
 *  - the tuned callback is received within kTuneCallbacktimeoutNs ns
 *  - skipping sub-channel or not does not fail the call
 */
 */
TEST_F(BroadcastRadioHidlTest, Step) {
TEST_F(BroadcastRadioHidlTest, Step) {
    ASSERT_EQ(true, openTuner());
    ASSERT_EQ(true, openTuner());
    ASSERT_TRUE(checkAntenna());
    ASSERT_TRUE(checkAntenna());
    // test step UP
    // test step UP
    mCallbackCalled = false;
    mCallbackCalled = false;
    Return<Result> hidlResult = mTuner->step(Direction::UP, true);
    Return<Result> hidlResult = mTuner->step(Direction::UP, false);
    EXPECT_TRUE(hidlResult.isOk());
    EXPECT_TRUE(hidlResult.isOk());
    EXPECT_EQ(Result::OK, hidlResult);
    EXPECT_EQ(Result::OK, hidlResult);
    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));
    EXPECT_EQ(true, waitForCallback(kTuneCallbacktimeoutNs));