1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_
6 #define MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_
8 #include "testing/gtest/include/gtest/gtest.h"
12 // Use in tests to either skip or fail a test when the system is missing a
13 // required audio device or library. If the --require-audio-hardware-for-testing
14 // flag is set, missing requirements will cause the test to fail. Otherwise it
16 #define ABORT_AUDIO_TEST_IF_NOT(requirements_satisfied) \
19 if (ShouldAbortAudioTest(requirements_satisfied, #requirements_satisfied, \
28 bool ShouldAbortAudioTest(bool requirements_satisfied
,
29 const char* requirements_expression
,
34 #endif // MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_