summaryrefslogtreecommitdiffstats
path: root/tests/HTTP
diff options
context:
space:
mode:
Diffstat (limited to 'tests/HTTP')
-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);
+)