Merge "audio: Remove redundant PrintTo definitions"

am: 7582ba18ee

Change-Id: I0a56044e6e532dd5608f8908963904a7c1b1fc1d
This commit is contained in:
Lloyd Pique
2019-11-20 14:55:19 -08:00
committed by android-build-merger
2 changed files with 0 additions and 61 deletions

View File

@@ -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

View File

@@ -58,7 +58,6 @@
#include "utility/AssertOk.h"
#include "utility/Documentation.h"
#include "utility/PrettyPrintAudioTypes.h"
#include "utility/ReturnIn.h"
#include "utility/ValidateXml.h"