From 8073d8e41c175ccd15129a280275fd8ac6efc635 Mon Sep 17 00:00:00 2001 From: Kevin Rocard Date: Thu, 28 Jun 2018 18:00:05 -0700 Subject: [PATCH] Audio VTS was testing wrong uninitialized variable due to typo The test was testing a uninitialized variable instead of testing the result of the tested method. Bug: 110963314 Test: vts-tradefed run commandAndExit vts --module VtsHalAudioV2_0Target Merged-In: I9a212eef690ae627fd7f7dbfaf4a0b4047c491b3 Change-Id: I9a212eef690ae627fd7f7dbfaf4a0b4047c491b3 Signed-off-by: Kevin Rocard (cherry picked from commit 72641e7ad014a011562c3fd16444b919d32aeb63) --- audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp index c764ea625e..761330f2bf 100644 --- a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp +++ b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp @@ -555,11 +555,11 @@ TEST_F(AudioPrimaryHidlTest, SetConnectedState) { address.device = deviceType; auto ret = device->setConnectedState(address, state); ASSERT_TRUE(ret.isOk()); - if (res == Result::NOT_SUPPORTED) { + if (ret == Result::NOT_SUPPORTED) { doc::partialTest("setConnectedState is not supported"); return; } - ASSERT_OK(res); + ASSERT_OK(ret); } } }