diff options
author | Lloyd Pique <lpique@google.com> | 2019-11-20 15:02:12 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-11-20 15:02:12 -0800 |
commit | 43286a882b66a5b8a33bd1d59fbbaef9f54f4057 (patch) | |
tree | dd19fa75ace9e52c8db134056ddc6bf11dc6571d /audio | |
parent | 7a72c47eb3831487b36e45f5c50b1c8c2c56776d (diff) | |
parent | b72d057e2490e6f59de6692faa6e8164c27d011f (diff) | |
download | platform_hardware_interfaces-43286a882b66a5b8a33bd1d59fbbaef9f54f4057.tar.gz platform_hardware_interfaces-43286a882b66a5b8a33bd1d59fbbaef9f54f4057.tar.bz2 platform_hardware_interfaces-43286a882b66a5b8a33bd1d59fbbaef9f54f4057.zip |
Merge "audio: Remove redundant PrintTo definitions" am: 7582ba18ee am: c93cb2e4b4
am: b72d057e24
Change-Id: I759f0e3a808780eb8b686d2553efeb96e46c3b7f
Diffstat (limited to 'audio')
-rw-r--r-- | audio/common/all-versions/test/utility/include/utility/PrettyPrintAudioTypes.h | 60 | ||||
-rw-r--r-- | audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h | 1 |
2 files changed, 0 insertions, 61 deletions
diff --git a/audio/common/all-versions/test/utility/include/utility/PrettyPrintAudioTypes.h b/audio/common/all-versions/test/utility/include/utility/PrettyPrintAudioTypes.h deleted file mode 100644 index 3833fd072e..0000000000 --- a/audio/common/all-versions/test/utility/include/utility/PrettyPrintAudioTypes.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) 2018 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ANDROID_HARDWARE_AUDIO_COMMON_TEST_UTILITY_PRETTY_PRINT_AUDIO_TYPES_H -#define ANDROID_HARDWARE_AUDIO_COMMON_TEST_UTILITY_PRETTY_PRINT_AUDIO_TYPES_H - -#include <iosfwd> -#include <utility> - -/** @file Use HIDL generated toString methods to pretty print gtest errors - * Unfortunately Gtest does not offer a template to specialize, only - * overloading PrintTo. - * @note that this overload can NOT be template because - * the fallback is already template, resulting in ambiguity. - * @note that the overload MUST be in the exact namespace - * the type is declared in, as per the ADL rules. - */ - -namespace android { -namespace hardware { -namespace audio { - -#define DEFINE_GTEST_PRINT_TO(T) \ - inline void PrintTo(const T& val, ::std::ostream* os) { *os << toString(val); } - -namespace CPP_VERSION { -DEFINE_GTEST_PRINT_TO(IPrimaryDevice::TtyMode) -DEFINE_GTEST_PRINT_TO(Result) -} // namespace CPP_VERSION - -namespace common { -namespace CPP_VERSION { -DEFINE_GTEST_PRINT_TO(AudioConfig) -DEFINE_GTEST_PRINT_TO(AudioMode) -DEFINE_GTEST_PRINT_TO(AudioDevice) -DEFINE_GTEST_PRINT_TO(AudioFormat) -DEFINE_GTEST_PRINT_TO(AudioChannelMask) -} // namespace CPP_VERSION -} // namespace common - -#undef DEFINE_GTEST_PRINT_TO - -} // namespace audio -} // namespace hardware -} // namespace android - -#endif // ANDROID_HARDWARE_AUDIO_COMMON_TEST_UTILITY_PRETTY_PRINT_AUDIO_TYPES_H diff --git a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h index beea8e0e08..6fc9339c54 100644 --- a/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h +++ b/audio/core/all-versions/vts/functional/AudioPrimaryHidlHalTest.h @@ -58,7 +58,6 @@ #include "utility/AssertOk.h" #include "utility/Documentation.h" -#include "utility/PrettyPrintAudioTypes.h" #include "utility/ReturnIn.h" #include "utility/ValidateXml.h" |