summaryrefslogtreecommitdiffstats
path: root/audio/2.0
diff options
context:
space:
mode:
authorKevin Rocard <krocard@google.com>2017-12-15 09:31:30 -0800
committerKevin Rocard <krocard@google.com>2018-01-20 10:49:57 -0800
commitb34af7c1924216ca4c452147802d2b81ea369002 (patch)
treef586bb7609396758834338198420aad55f662551 /audio/2.0
parent6891d7ec28761db85c8d4c486fe105ee64a2bd04 (diff)
downloadplatform_hardware_interfaces-b34af7c1924216ca4c452147802d2b81ea369002.tar.gz
platform_hardware_interfaces-b34af7c1924216ca4c452147802d2b81ea369002.tar.bz2
platform_hardware_interfaces-b34af7c1924216ca4c452147802d2b81ea369002.zip
Audio V4: Make test helper version independent
Bug: 38184704 Test: compile Change-Id: Ia9ec81ccbad1d7411fdc570ae6dd728dd1520065
Diffstat (limited to 'audio/2.0')
-rw-r--r--audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
index fd175de8f5..73bf61c3d5 100644
--- a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
+++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -20,6 +20,7 @@
#include <cmath>
#include <cstddef>
#include <cstdio>
+#include <initializer_list>
#include <limits>
#include <string>
#include <vector>
@@ -40,9 +41,11 @@
#include "utility/AssertOk.h"
#include "utility/Documentation.h"
#include "utility/EnvironmentTearDown.h"
+#define AUDIO_HAL_VERSION V2_0
#include "utility/PrettyPrintAudioTypes.h"
#include "utility/ReturnIn.h"
+using std::initializer_list;
using std::string;
using std::to_string;
using std::vector;
@@ -856,7 +859,7 @@ TEST_IO_STREAM(GetHwAvSync, "Get hardware sync can not fail",
ASSERT_IS_OK(device->getHwAvSync()));
static void checkGetNoParameter(IStream* stream, hidl_vec<hidl_string> keys,
- vector<Result> expectedResults) {
+ initializer_list<Result> expectedResults) {
hidl_vec<ParameterValue> parameters;
Result res;
ASSERT_OK(stream->getParameters(keys, returnIn(res, parameters)));
@@ -924,8 +927,7 @@ TEST_IO_STREAM(RemoveNonExistingEffect,
TEST_IO_STREAM(standby, "Make sure the stream can be put in stanby",
ASSERT_OK(stream->standby())) // can not fail
-static vector<Result> invalidStateOrNotSupported = {Result::INVALID_STATE,
- Result::NOT_SUPPORTED};
+static constexpr auto invalidStateOrNotSupported = {Result::INVALID_STATE, Result::NOT_SUPPORTED};
TEST_IO_STREAM(startNoMmap,
"Starting a mmaped stream before mapping it should fail",