summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/tests/test_httpoperation.hpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-05-15 16:35:49 +0300
committerGitHub <noreply@github.com>2024-05-15 16:35:49 +0300
commite49dcb8d0c9f539997effb640e350d9d0689aae6 (patch)
tree1bf99eaccce6de17c62f13c6595f7f497548dc5c /indra/llcorehttp/tests/test_httpoperation.hpp
parent531cd34f670170ade57f8813fe48012b61a1d3c2 (diff)
parent5f8a7374b9f18e0112d6749a9c845bd077a81acb (diff)
Merge pull request #1476 from secondlife/marchcat/x-b-merge
Maint X -> Maint B merge
Diffstat (limited to 'indra/llcorehttp/tests/test_httpoperation.hpp')
-rw-r--r--indra/llcorehttp/tests/test_httpoperation.hpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/indra/llcorehttp/tests/test_httpoperation.hpp b/indra/llcorehttp/tests/test_httpoperation.hpp
index c6407e8d04..6778c3440b 100644
--- a/indra/llcorehttp/tests/test_httpoperation.hpp
+++ b/indra/llcorehttp/tests/test_httpoperation.hpp
@@ -1,4 +1,4 @@
-/**
+/**
* @file test_httpoperation.hpp
* @brief unit tests for the LLCore::HttpOperation-derived classes
*
@@ -41,11 +41,11 @@ namespace
class TestHandler : public LLCore::HttpHandler
{
public:
- virtual void onCompleted(HttpHandle, HttpResponse *)
- {
- std::cout << "TestHandler::onCompleted() invoked" << std::endl;
- }
-
+ virtual void onCompleted(HttpHandle, HttpResponse *)
+ {
+ std::cout << "TestHandler::onCompleted() invoked" << std::endl;
+ }
+
};
@@ -54,53 +54,53 @@ public:
namespace tut
{
- struct HttpOperationTestData
- {
- // the test objects inherit from this so the member functions and variables
- // can be referenced directly inside of the test functions.
- };
+ struct HttpOperationTestData
+ {
+ // the test objects inherit from this so the member functions and variables
+ // can be referenced directly inside of the test functions.
+ };
+
+ typedef test_group<HttpOperationTestData> HttpOperationTestGroupType;
+ typedef HttpOperationTestGroupType::object HttpOperationTestObjectType;
+ HttpOperationTestGroupType HttpOperationTestGroup("HttpOperation Tests");
- typedef test_group<HttpOperationTestData> HttpOperationTestGroupType;
- typedef HttpOperationTestGroupType::object HttpOperationTestObjectType;
- HttpOperationTestGroupType HttpOperationTestGroup("HttpOperation Tests");
+ template <> template <>
+ void HttpOperationTestObjectType::test<1>()
+ {
+ set_test_name("HttpOpNull construction");
- template <> template <>
- void HttpOperationTestObjectType::test<1>()
- {
- set_test_name("HttpOpNull construction");
+ // create a new ref counted object with an implicit reference
+ HttpOperation::ptr_t op (new HttpOpNull());
+ ensure(op.use_count() == 1);
- // create a new ref counted object with an implicit reference
- HttpOperation::ptr_t op (new HttpOpNull());
- ensure(op.use_count() == 1);
+ // release the implicit reference, causing the object to be released
+ op.reset();
+ }
- // release the implicit reference, causing the object to be released
- op.reset();
- }
+ template <> template <>
+ void HttpOperationTestObjectType::test<2>()
+ {
+ set_test_name("HttpOpNull construction with handlers");
- template <> template <>
- void HttpOperationTestObjectType::test<2>()
- {
- set_test_name("HttpOpNull construction with handlers");
+ // Get some handlers
+ LLCore::HttpHandler::ptr_t h1 (new TestHandler());
- // Get some handlers
- LLCore::HttpHandler::ptr_t h1 (new TestHandler());
-
- // create a new ref counted object with an implicit reference
- HttpOperation::ptr_t op (new HttpOpNull());
+ // create a new ref counted object with an implicit reference
+ HttpOperation::ptr_t op (new HttpOpNull());
- // Add the handlers
- op->setReplyPath(LLCore::HttpOperation::HttpReplyQueuePtr_t(), h1);
+ // Add the handlers
+ op->setReplyPath(LLCore::HttpOperation::HttpReplyQueuePtr_t(), h1);
- // Check ref count
- ensure(op.unique() == 1);
+ // Check ref count
+ ensure(op.unique() == 1);
- // release the reference, releasing the operation but
- // not the handlers.
- op.reset();
+ // release the reference, releasing the operation but
+ // not the handlers.
+ op.reset();
- // release the handlers
- h1.reset();
- }
+ // release the handlers
+ h1.reset();
+ }
}