diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-05-16 01:08:13 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-16 01:08:13 +0300 |
| commit | d41e167aa9a22b446cbcfe6fd4ebdd810c61ba73 (patch) | |
| tree | 3ed50d019b3d78c748ed6b46ca69f2ca7943f41a /indra/llcorehttp/tests/test_httpoperation.hpp | |
| parent | 29be88d60d654193926add496d2d851f7c217356 (diff) | |
| parent | bdb8caf790207e1a6f46d495a586b38bb52e58e9 (diff) | |
Merge pull request #1478 from secondlife/marchcat/x-mf-merge
Maint X -> Materials Featurette merge
Diffstat (limited to 'indra/llcorehttp/tests/test_httpoperation.hpp')
| -rw-r--r-- | indra/llcorehttp/tests/test_httpoperation.hpp | 106 |
1 files changed, 53 insertions, 53 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. - }; - - typedef test_group<HttpOperationTestData> HttpOperationTestGroupType; - typedef HttpOperationTestGroupType::object HttpOperationTestObjectType; - HttpOperationTestGroupType HttpOperationTestGroup("HttpOperation Tests"); - - 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); - - // 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"); - - // 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()); - - // Add the handlers - op->setReplyPath(LLCore::HttpOperation::HttpReplyQueuePtr_t(), h1); - - // Check ref count - ensure(op.unique() == 1); - - // release the reference, releasing the operation but - // not the handlers. - op.reset(); - - // release the handlers - h1.reset(); - } + 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"); + + 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); + + // 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"); + + // 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()); + + // Add the handlers + op->setReplyPath(LLCore::HttpOperation::HttpReplyQueuePtr_t(), h1); + + // Check ref count + ensure(op.unique() == 1); + + // release the reference, releasing the operation but + // not the handlers. + op.reset(); + + // release the handlers + h1.reset(); + } } |
