Refactoring audio_device_test_api for gtest and execution on all platforms.
All the code that was previously in one single function is now broken up into 44 gtest tests. The creation of the Audio Device is done once (SetUpTestCase) and the audio device is initialized before each test (SetUp) and terminated after each test (TearDown). Doing this, the things that execute are basically the same since the test was structured as different sections separated by these calls:
TEST(audioDevice->Terminate() == 0);
TEST(audioDevice->Init() == 0);
I also cleaned up some unused helper functions and removed old test macros when replacing them by gtest macros.
The parts that are failing for Mac and Windows are excluded using #ifdef. Separate issues are filed for
this code to be fixed.
Formatting is updated to follow the WebRTC style guide.
BUG=None.
TEST=audio_device_test_api in Debug+Release on Linux, Mac and Windows. Test run audio_device_test_func on Linux.
Review URL: https://webrtc-codereview.appspot.com/437002
git-svn-id: http://webrtc.googlecode.com/svn/trunk@1861 4adac7df-926f-26a2-2b94-8c16560cd09d
5 files changed