summaryrefslogtreecommitdiff
path: root/test/http_gtest_main.cpp
diff options
context:
space:
mode:
authorlijia <[email protected]>2024-05-24 22:47:32 +0800
committerlijia <[email protected]>2024-05-26 19:45:15 +0800
commit50a9fea27ca30d532bf89bc8fd7e6025a240e9e4 (patch)
treee066e771c8a4abb3f1997ea3e0aebcb2d259f85e /test/http_gtest_main.cpp
parent22d071e23ff423242f51dce2eab1477b5fb9d106 (diff)
Adapt to stellar v2.0v2.0.1
Diffstat (limited to 'test/http_gtest_main.cpp')
-rw-r--r--test/http_gtest_main.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/test/http_gtest_main.cpp b/test/http_gtest_main.cpp
deleted file mode 100644
index 5b7aee5..0000000
--- a/test/http_gtest_main.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-#include <assert.h>
-#include <getopt.h>
-#include <gtest/gtest.h>
-#include "http_decoder_gtest.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-struct fake_stellar *g_fake_stellar; //export symbol for commit_test_result_json()
-extern int http_decoder_entry(struct session *sess, int events,const struct packet *pkt, void *cb_arg);
-extern int http_decoder_test_entry(struct session *sess, int topic_id, const void *data, void *cb_arg);
-extern void *http_decoder_init(struct stellar *st);
-extern void *http_decoder_test_init(struct stellar *st);
-}
-#endif
-
-TEST(HTTP_DECODER, GTEST)
-{
- ASSERT_EQ(0, hdgt_compare_result(g_fake_stellar));
-}
-
-int main(int argc, char **argv)
-{
- g_fake_stellar = hdgt_create();
-
- if(hdgt_init_once(g_fake_stellar, argc, argv, http_decoder_init, http_decoder_entry, http_decoder_test_init, http_decoder_test_entry) < 0)
- {
- fprintf(stderr, "hdgt_init_once() fail!\n");
- exit(1);
- }
-
- hdgt_main_loop(g_fake_stellar);
-
- ::testing::InitGoogleTest(&argc, argv);
- int ret = RUN_ALL_TESTS();
-
- hdgt_destroy(g_fake_stellar);
-
- return ret;
-} \ No newline at end of file