Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: media/audio/audio_unittest_util.h

Issue 914483002: Add flag --require-audio-hardware-for-testing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/audio_unittest_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_
6 #define MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_
7
8 #include "testing/gtest/include/gtest/gtest.h"
9
10 namespace media {
11
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
15 // will be skipped.
16 #define ABORT_AUDIO_TEST_IF_NOT(requirements_satisfied) \
17 do { \
18 bool fail = false; \
19 if (ShouldAbortAudioTest(requirements_satisfied, #requirements_satisfied, \
20 &fail)) { \
21 if (fail) \
22 FAIL(); \
23 else \
24 return; \
25 } \
26 } while (false)
27
28 bool ShouldAbortAudioTest(bool requirements_satisfied,
29 const char* requirements_expression,
30 bool* should_fail);
31
32 } // namespace media
33
34 #endif // MEDIA_AUDIO_AUDIO_UNITTEST_UTIL_H_
OLDNEW
« no previous file with comments | « media/audio/audio_manager_unittest.cc ('k') | media/audio/audio_unittest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698