X Tutup
/* This file is part of libhttpserver Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "littletest.hpp" #include #include #include #include "httpserver.hpp" using namespace httpserver; using namespace std; std::string lorem_ipsum(" , unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci v'elit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? [33] At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. , unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci v'elit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? [33] At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. , unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci v'elit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? [33] At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. , unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci v'elit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? [33] At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. , unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci v'elit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? [33] At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."); size_t writefunc(void *ptr, size_t size, size_t nmemb, std::string *s) { s->append((char*) ptr, size*nmemb); return size*nmemb; } size_t headerfunc(void *ptr, size_t size, size_t nmemb, map* ss) { string s_ptr((char*)ptr, size*nmemb); size_t pos = s_ptr.find(":"); if(pos != string::npos) (*ss)[s_ptr.substr(0, pos)] = s_ptr.substr(pos + 2, s_ptr.size() - pos - 4); return size*nmemb; } class simple_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } void render_POST(const http_request& req, http_response** res) { *res = new http_response( http_response_builder(req.get_arg("arg1")+req.get_arg("arg2"), 200, "text/plain").string_response() ); } }; class long_content_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { *res = new http_response(http_response_builder(lorem_ipsum, 200, "text/plain").string_response()); } }; class header_test_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { http_response_builder hrb("OK", 200, "text/plain"); hrb.with_header("KEY", "VALUE"); *res = new http_response(hrb.string_response()); } }; class complete_test_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } void render_POST(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } void render_PUT(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } void render_DELETE(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } void render_CONNECT(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } }; class only_render_resource : public http_resource { public: void render(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } }; class ok_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("OK", 200, "text/plain").string_response()); } }; class nok_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { *res = new http_response(http_response_builder("NOK", 200, "text/plain").string_response()); } }; class no_response_resource : public http_resource { public: void render_GET(const http_request& req, http_response** res) { } }; LT_BEGIN_SUITE(basic_suite) webserver* ws; void set_up() { ws = new webserver(create_webserver(8080)); ws->start(false); } void tear_down() { ws->stop(); delete ws; } LT_END_SUITE(basic_suite) LT_BEGIN_AUTO_TEST(basic_suite, two_endpoints) ok_resource* ok = new ok_resource(); ws->register_resource("OK", ok); nok_resource* nok = new nok_resource(); ws->register_resource("NOK", nok); curl_global_init(CURL_GLOBAL_ALL); std::string s; { CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/OK"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); } std::string t; { CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/NOK"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &t); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(t, "NOK"); curl_easy_cleanup(curl); } LT_END_AUTO_TEST(two_endpoints) LT_BEGIN_AUTO_TEST(basic_suite, read_body) simple_resource* resource = new simple_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); LT_END_AUTO_TEST(read_body) LT_BEGIN_AUTO_TEST(basic_suite, read_long_body) long_content_resource* resource = new long_content_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s.size(), lorem_ipsum.size()); curl_easy_cleanup(curl); LT_END_AUTO_TEST(read_long_body) LT_BEGIN_AUTO_TEST(basic_suite, read_header) header_test_resource* resource = new header_test_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; map ss; CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, headerfunc); curl_easy_setopt(curl, CURLOPT_WRITEHEADER, &ss); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); LT_CHECK_EQ(ss["KEY"], "VALUE"); curl_easy_cleanup(curl); LT_END_AUTO_TEST(read_header) LT_BEGIN_AUTO_TEST(basic_suite, complete) complete_test_resource* resource = new complete_test_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL* curl; CURLcode res; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE"); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT"); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CONNECT"); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_POST, 1L); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); LT_END_AUTO_TEST(complete) LT_BEGIN_AUTO_TEST(basic_suite, only_render) only_render_resource* resource = new only_render_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL* curl; CURLcode res; s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "PUT"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "CONNECT"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "NOT_EXISTENT"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "Method not Allowed"); curl_easy_cleanup(curl); s = ""; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_POST, 1L); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL); curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 0); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "OK"); curl_easy_cleanup(curl); LT_END_AUTO_TEST(only_render) LT_BEGIN_AUTO_TEST(basic_suite, postprocessor) simple_resource* resource = new simple_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "arg1=lib&arg2=httpserver"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); LT_CHECK_EQ(s, "libhttpserver"); curl_easy_cleanup(curl); LT_END_AUTO_TEST(postprocessor) LT_BEGIN_AUTO_TEST(basic_suite, empty_arg) simple_resource* resource = new simple_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); CURL *curl = curl_easy_init(); CURLcode res; curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "arg1"); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writefunc); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); curl_easy_cleanup(curl); LT_END_AUTO_TEST(empty_arg) LT_BEGIN_AUTO_TEST(basic_suite, no_response) no_response_resource* resource = new no_response_resource(); ws->register_resource("base", resource); curl_global_init(CURL_GLOBAL_ALL); std::string s; CURL* curl; CURLcode res; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, "localhost:8080/base"); curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L); res = curl_easy_perform(curl); LT_ASSERT_EQ(res, 0); long http_code = 0; curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code); LT_ASSERT_EQ(http_code, 500); curl_easy_cleanup(curl); LT_END_AUTO_TEST(no_response) LT_BEGIN_AUTO_TEST_ENV() AUTORUN_TESTS() LT_END_AUTO_TEST_ENV()
X Tutup