shithub: openh264

Download patch

ref: bc3c63c4319949a9da0257d4a195de43987a5db5
parent: 8300714234766446669a8d0efe99fc71e6aada44
author: EKR <[email protected]>
date: Thu Dec 12 06:38:15 EST 2013

Add a trivial init test

--- a/test/simple_test.cpp
+++ b/test/simple_test.cpp
@@ -1,4 +1,38 @@
 #include <gtest/gtest.h>
+#if defined (WIN32)
+#include <windows.h>
+#include <tchar.h>
+#else
+#include <string.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+
+#include "codec_def.h"
+#include "codec_app_def.h"
+#include "codec_api.h"
+
+class CodecTest : public ::testing::Test {
+ public:
+  CodecTest() : decoder_(NULL) {}
+
+  ~CodecTest() {
+    if (decoder_) DestroyDecoder(decoder_);
+  }
+
+  void SetUp() {
+    long rv = CreateDecoder(&decoder_);
+    ASSERT_EQ(0, rv);
+    ASSERT_TRUE(decoder_);
+  }
+
+protected:
+  ISVCDecoder *decoder_;
+};
+
+TEST_F(CodecTest, JustInit) {
+}
 
 int main(int argc, char **argv) {
   testing::InitGoogleTest(&argc, argv);