From: Jelte Jansen Date: Thu, 4 Oct 2012 09:44:46 +0000 (+0200) Subject: [2275] use const char* for test globals X-Git-Tag: trac2402_base~15^2~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b41cca56e918501b7a84cfe31067f786ed1d065e;p=thirdparty%2Fkea.git [2275] use const char* for test globals --- diff --git a/src/lib/resolve/tests/recursive_query_unittest_2.cc b/src/lib/resolve/tests/recursive_query_unittest_2.cc index 2b3d12979b..85e2c384fe 100644 --- a/src/lib/resolve/tests/recursive_query_unittest_2.cc +++ b/src/lib/resolve/tests/recursive_query_unittest_2.cc @@ -79,10 +79,10 @@ using namespace std; namespace isc { namespace asiodns { -const std::string TEST_ADDRESS = "127.0.0.1"; ///< Servers are on this address -const uint16_t TEST_PORT = 5301; ///< ... and this port -const size_t BUFFER_SIZE = 1024; ///< For all buffers -const char* WWW_EXAMPLE_ORG = "192.0.2.254"; ///< Address of www.example.org +const char* TEST_ADDRESS = "127.0.0.1"; ///< Servers are on this address +const uint16_t TEST_PORT = 5301; ///< ... and this port +const size_t BUFFER_SIZE = 1024; ///< For all buffers +const char* WWW_EXAMPLE_ORG = "192.0.2.254"; ///< Address of www.example.org // As the test is fairly long and complex, debugging "print" statements have // been left in although they are disabled. Set the following to "true" to diff --git a/src/lib/resolve/tests/recursive_query_unittest_3.cc b/src/lib/resolve/tests/recursive_query_unittest_3.cc index 168ec80d6b..fdbae7ba10 100644 --- a/src/lib/resolve/tests/recursive_query_unittest_3.cc +++ b/src/lib/resolve/tests/recursive_query_unittest_3.cc @@ -72,12 +72,11 @@ using namespace std; namespace isc { namespace asiodns { -const std::string TEST_ADDRESS3 = "127.0.0.1"; - ///< Servers are on this address -const uint16_t TEST_PORT3 = 5303; ///< ... and this port +const char* TEST_ADDRESS3 = "127.0.0.1"; ///< Servers are on this address +const uint16_t TEST_PORT3 = 5303; ///< ... and this port const size_t BUFFER_SIZE = 1024; ///< For all buffers -const std::string DUMMY_ADDR3 = "1.2.3.4"; ///< address to return as A +const char* DUMMY_ADDR3 = "1.2.3.4"; ///< address to return as A class MockResolver3 : public isc::resolve::ResolverInterface { public: