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

Side by Side Diff: media/audio/audio_unittest_utils.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
OLDNEW
(Empty)
1 #include "testing/gtest/include/gtest/gtest.h"
DaleCurtis 2015/02/09 22:10:49 Needs license header. #ifdef protections for multi
watk 2015/02/10 01:38:33 Oh jeez, I forgot a lot of stuff. I put it in the
watk 2015/02/10 01:38:33 Done.
2
3 // Use in tests to either skip or fail a test when the system is missing a
4 // required audio device or library. If the |kRequireAudioHardwareForTesting|
DaleCurtis 2015/02/09 22:10:50 I'd use the actual --flag-name.
watk 2015/02/10 01:38:33 Done.
5 // flag is set, missing requirements will cause the test to fail. Otherwise it
6 // will be skipped.
7 #define ABORT_AUDIO_TEST_IF_NOT(requirements_satisfied) \
8 do { \
9 bool fail = false; \
10 if (should_abort_audio_test(requirements_satisfied, \
11 #requirements_satisfied, &fail)) { \
12 if (fail) \
13 FAIL(); \
14 else \
15 return; \
16 } \
17 } while (false)
18
19 bool should_abort_audio_test(bool requirements_satisfied,
DaleCurtis 2015/02/09 22:10:49 Should be CamelCase method name.
watk 2015/02/10 01:38:33 Done.
20 const char* requirements_expression,
21 bool* should_fail);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698