Browse Source

[2275] use const char* for test globals

Jelte Jansen 12 years ago
parent
commit
b41cca56e9

+ 4 - 4
src/lib/resolve/tests/recursive_query_unittest_2.cc

@@ -79,10 +79,10 @@ using namespace std;
 namespace isc {
 namespace isc {
 namespace asiodns {
 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
 // 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
 // been left in although they are disabled.  Set the following to "true" to

+ 3 - 4
src/lib/resolve/tests/recursive_query_unittest_3.cc

@@ -72,12 +72,11 @@ using namespace std;
 namespace isc {
 namespace isc {
 namespace asiodns {
 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 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 {
 class MockResolver3 : public isc::resolve::ResolverInterface {
 public:
 public: