Converted to gtest, writing output files properly and no longer uses exceptions.

This test now runs and fails as a gtest should (previously it always
exited with 0 even if the tests failed).
The audio_coding_module_test target no longer uses exceptions in the generated project.
Output files are written to our global output folder, using
testsupport/fileutils.h.

BUG=
TEST=audio_coding_module_test on all platforms, in Debug+Release

Review URL: http://webrtc-codereview.appspot.com/334004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1266 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/src/modules/audio_coding/main/test/TestVADDTX.cpp b/src/modules/audio_coding/main/test/TestVADDTX.cpp
index 6fd1ef8..a220395 100644
--- a/src/modules/audio_coding/main/test/TestVADDTX.cpp
+++ b/src/modules/audio_coding/main/test/TestVADDTX.cpp
@@ -10,12 +10,14 @@
 
 #include "TestVADDTX.h"
 
-#include "common_types.h"
-#include "audio_coding_module_typedefs.h"
-#include "utility.h"
-#include "engine_configurations.h"
 #include <iostream>
+
+#include "audio_coding_module_typedefs.h"
+#include "common_types.h"
+#include "engine_configurations.h"
+#include "testsupport/fileutils.h"
 #include "trace.h"
+#include "utility.h"
 
 namespace webrtc {
 
@@ -351,15 +353,17 @@
 
 void TestVADDTX::OpenOutFile(WebRtc_Word16 testNumber)
 {
-    char fileName[500] = "./src/modules/audio_coding/main/test/testVADDTX_outFile_";
-    char cntrStr[10];
-
+    char fileName[500];
     if(_testMode == 0)
     {
-        sprintf(fileName, "./src/modules/audio_coding/main/test/testVADDTX_autoFile_");
+        sprintf(fileName, "%s/testVADDTX_autoFile_%02d.pcm",
+                webrtc::test::OutputPath().c_str(), testNumber);
     }
-    sprintf(cntrStr, "%02d.pcm", testNumber);
-    strcat(fileName, cntrStr);
+    else
+    {
+        sprintf(fileName, "%s/testVADDTX_outFile_%02d.pcm",
+                webrtc::test::OutputPath().c_str(), testNumber);
+    }
     _outFileB.Open(fileName, 16000, "wb");
 }