OLD | NEW |
---|---|
(Empty) | |
1 #include "base/command_line.h" | |
DaleCurtis
2015/02/09 22:10:49
Needs license header.
watk
2015/02/10 01:38:33
Done.
| |
2 #include "base/logging.h" | |
3 #include "media/base/media_switches.h" | |
4 | |
5 // For macro ABORT_AUDIO_TEST_IF_NOT. | |
6 bool should_abort_audio_test(bool requirements_satisfied, | |
7 const char* requirements_expression, | |
8 bool* should_fail) { | |
9 bool fail_if_unsatisfied = base::CommandLine::ForCurrentProcess()->HasSwitch( | |
10 switches::kRequireAudioHardwareForTesting); | |
11 if (!requirements_satisfied) { | |
12 LOG(WARNING) << "Requirement(s) not satisfied (" << requirements_expression | |
13 << ")"; | |
14 *should_fail = fail_if_unsatisfied; | |
DaleCurtis
2015/02/09 22:10:49
Should always be set?
watk
2015/02/10 01:38:33
May as well
| |
15 return true; | |
16 } | |
17 return false; | |
18 } | |
OLD | NEW |