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
Change-Id: I9a212eef690ae627fd7f7dbfaf4a0b4047c491b3
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp
index 4aeefa6..0f8996f 100644
--- a/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp
+++ b/audio/core/4.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -558,11 +558,11 @@
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);
}
}
}