summaryrefslogtreecommitdiffstats
path: root/tests/HTTP/UrlClientTest.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2019-08-26 21:38:34 +0200
committerGitHub <noreply@github.com>2019-08-26 21:38:34 +0200
commit74579fbadf0f89154cba5d9157a57f59fcda8f70 (patch)
tree2aca1ce5d8e41e91adcfe25dfb4bb51369fb865e /tests/HTTP/UrlClientTest.cpp
parentAdded BlockState implementation for 1.13 support. (diff)
downloadcuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.gz
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.bz2
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.lz
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.xz
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.tar.zst
cuberite-74579fbadf0f89154cba5d9157a57f59fcda8f70.zip
Diffstat (limited to '')
-rw-r--r--tests/HTTP/UrlClientTest.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/tests/HTTP/UrlClientTest.cpp b/tests/HTTP/UrlClientTest.cpp
index e86ad9156..206165dee 100644
--- a/tests/HTTP/UrlClientTest.cpp
+++ b/tests/HTTP/UrlClientTest.cpp
@@ -1,5 +1,6 @@
#include "Globals.h"
+#include "../TestHelpers.h"
#include "HTTP/UrlClient.h"
#include "OSSupport/NetworkSingleton.h"
@@ -228,28 +229,15 @@ int TestRequests()
-int main()
-{
- LOGD("Test started");
-
- LOGD("Initializing cNetwork...");
+IMPLEMENT_TEST_MAIN("UrlClient",
+ LOG("Initializing cNetwork...");
cNetworkSingleton::Get().Initialise();
-
- LOGD("Testing...");
- auto res = TestRequests();
-
- LOGD("Terminating cNetwork...");
+ LOG("Testing...");
+ TEST_EQUAL(TestRequests(), 0);
+ LOG("Terminating cNetwork...");
cNetworkSingleton::Get().Terminate();
// No leaked callback instances
- LOGD("cCallback instances still alive: %d", g_ActiveCallbacks.load());
- assert_test(g_ActiveCallbacks == 0);
-
- LOGD("cUrlClient test finished");
-
- return res;
-}
-
-
-
-
+ LOG("cCallback instances still alive: %d", g_ActiveCallbacks.load());
+ TEST_EQUAL(g_ActiveCallbacks, 0);
+)