Restructuring and adding dummy unit test target.

Empty test added to get code coverage recorded.

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@967 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/Android.mk b/Android.mk
index 4d2ce38..bd050e6 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,7 +15,7 @@
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/neteq/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/cng/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/g711/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/G722/main/source/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/g722/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/pcm16b/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/ilbc/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk
diff --git a/src/modules/audio_coding/codecs/G722/main/source/Android.mk b/src/modules/audio_coding/codecs/g722/Android.mk
similarity index 87%
rename from src/modules/audio_coding/codecs/G722/main/source/Android.mk
rename to src/modules/audio_coding/codecs/g722/Android.mk
index 59b9462..39dea9e 100644
--- a/src/modules/audio_coding/codecs/G722/main/source/Android.mk
+++ b/src/modules/audio_coding/codecs/g722/Android.mk
@@ -10,7 +10,7 @@
 
 include $(CLEAR_VARS)
 
-include $(LOCAL_PATH)/../../../../../../../android-webrtc.mk
+include $(LOCAL_PATH)/../../../../../android-webrtc.mk
 
 LOCAL_ARM_MODE := arm
 LOCAL_MODULE_CLASS := STATIC_LIBRARIES
@@ -26,8 +26,8 @@
     $(MY_WEBRTC_COMMON_DEFS)
 
 LOCAL_C_INCLUDES := \
-    $(LOCAL_PATH)/../interface \
-    $(LOCAL_PATH)/../../../../../..
+    $(LOCAL_PATH)/include \
+    $(LOCAL_PATH)/../../../..
 
 LOCAL_SHARED_LIBRARIES := \
     libcutils \
diff --git a/src/modules/audio_coding/codecs/G722/main/source/g722.gypi b/src/modules/audio_coding/codecs/g722/g722.gypi
similarity index 74%
rename from src/modules/audio_coding/codecs/G722/main/source/g722.gypi
rename to src/modules/audio_coding/codecs/g722/g722.gypi
index 841a6ae..79c94f8 100644
--- a/src/modules/audio_coding/codecs/G722/main/source/g722.gypi
+++ b/src/modules/audio_coding/codecs/g722/g722.gypi
@@ -11,15 +11,15 @@
       'target_name': 'G722',
       'type': '<(library)',
       'include_dirs': [
-        '../interface',
+        'include',
       ],
       'direct_dependent_settings': {
         'include_dirs': [
-          '../interface',
+          'include',
         ],
       },
       'sources': [
-        '../interface/g722_interface.h',
+        'include/g722_interface.h',
         'g722_interface.c',
         'g722_encode.c',
         'g722_decode.c',
@@ -28,17 +28,28 @@
     },
   ], # targets
   # Exclude the test target when building with chromium.
-  'conditions': [   
+  'conditions': [
     ['build_with_chromium==0', {
       'targets': [
         {
+          'target_name': 'g722_unittests',
+          'type': 'executable',
+          'dependencies': [
+            'G722',
+            '<(webrtc_root)/../test/test.gyp:test_support_main',
+          ],
+          'sources': [
+            'g722_unittest.cc',
+          ],
+        },
+        {
           'target_name': 'G722Test',
           'type': 'executable',
           'dependencies': [
             'G722',
           ],
           'sources': [
-            '../testG722/testG722.cpp',
+            'test/testG722.cpp',
           ],
         },
       ], # targets
diff --git a/src/modules/audio_coding/codecs/G722/main/source/g722_decode.c b/src/modules/audio_coding/codecs/g722/g722_decode.c
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/source/g722_decode.c
rename to src/modules/audio_coding/codecs/g722/g722_decode.c
diff --git a/src/modules/audio_coding/codecs/G722/main/source/g722_enc_dec.h b/src/modules/audio_coding/codecs/g722/g722_enc_dec.h
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/source/g722_enc_dec.h
rename to src/modules/audio_coding/codecs/g722/g722_enc_dec.h
diff --git a/src/modules/audio_coding/codecs/G722/main/source/g722_encode.c b/src/modules/audio_coding/codecs/g722/g722_encode.c
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/source/g722_encode.c
rename to src/modules/audio_coding/codecs/g722/g722_encode.c
diff --git a/src/modules/audio_coding/codecs/G722/main/source/g722_interface.c b/src/modules/audio_coding/codecs/g722/g722_interface.c
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/source/g722_interface.c
rename to src/modules/audio_coding/codecs/g722/g722_interface.c
diff --git a/src/modules/audio_coding/codecs/g722/g722_unittest.cc b/src/modules/audio_coding/codecs/g722/g722_unittest.cc
new file mode 100644
index 0000000..85c8baa
--- /dev/null
+++ b/src/modules/audio_coding/codecs/g722/g722_unittest.cc
@@ -0,0 +1,18 @@
+/*
+ *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+/*
+ * Empty test just to get code coverage metrics for this dir.
+ */
+#include "g722_interface.h"
+
+
+
+
diff --git a/src/modules/audio_coding/codecs/G722/main/interface/g722_interface.h b/src/modules/audio_coding/codecs/g722/include/g722_interface.h
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/interface/g722_interface.h
rename to src/modules/audio_coding/codecs/g722/include/g722_interface.h
diff --git a/src/modules/audio_coding/codecs/G722/main/testG722/testG722.cpp b/src/modules/audio_coding/codecs/g722/test/testG722.cpp
similarity index 100%
rename from src/modules/audio_coding/codecs/G722/main/testG722/testG722.cpp
rename to src/modules/audio_coding/codecs/g722/test/testG722.cpp
diff --git a/src/modules/audio_coding/main/source/Android.mk b/src/modules/audio_coding/main/source/Android.mk
index 7ecaed4..90214a9 100644
--- a/src/modules/audio_coding/main/source/Android.mk
+++ b/src/modules/audio_coding/main/source/Android.mk
@@ -43,7 +43,7 @@
     $(LOCAL_PATH)/../interface \
     $(LOCAL_PATH)/../../codecs/cng/include \
     $(LOCAL_PATH)/../../codecs/g711/include \
-    $(LOCAL_PATH)/../../codecs/G722/main/interface \
+    $(LOCAL_PATH)/../../codecs/g722/include \
     $(LOCAL_PATH)/../../codecs/ilbc/interface \
     $(LOCAL_PATH)/../../codecs/iSAC/main/interface \
     $(LOCAL_PATH)/../../codecs/iSAC/fix/interface \
diff --git a/src/modules/modules.gyp b/src/modules/modules.gyp
index dbc52e3..86678a7 100644
--- a/src/modules/modules.gyp
+++ b/src/modules/modules.gyp
@@ -11,7 +11,7 @@
     '../build/common.gypi',
     'audio_coding/codecs/cng/cng.gypi',
     'audio_coding/codecs/g711/g711.gypi',
-    'audio_coding/codecs/G722/main/source/g722.gypi',
+    'audio_coding/codecs/g722/g722.gypi',
     'audio_coding/codecs/ilbc/ilbc.gypi',
     'audio_coding/codecs/iSAC/main/source/isac.gypi',
     'audio_coding/codecs/iSAC/fix/source/isacfix.gypi',
diff --git a/src/voice_engine/main/test/android/android_test/jni/Android.mk b/src/voice_engine/main/test/android/android_test/jni/Android.mk
index b78cf87..2e7d742 100644
--- a/src/voice_engine/main/test/android/android_test/jni/Android.mk
+++ b/src/voice_engine/main/test/android/android_test/jni/Android.mk
@@ -18,7 +18,7 @@
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/NetEQ/main/source/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/cng/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/g711/Android.mk
-include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/G722/main/source/Android.mk
+include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/g722/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/pcm16b/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/iLBC/main/source/Android.mk
 include $(MY_WEBRTC_ROOT_PATH)/$(MY_WEBRTC_SRC_PATH)/src/modules/audio_coding/codecs/iSAC/fix/source/Android.mk