summaryrefslogtreecommitdiffstats
path: root/src/bin/d2/tests
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2013-07-01 14:11:05 +0200
committerThomas Markwalder <tmark@isc.org>2013-07-01 14:11:05 +0200
commit6e99f2cb85dd4722f7a5c2d15ebf2458cecc7b32 (patch)
tree6c373ef5367caf2b9ddaca2272e6f740f73cf0f3 /src/bin/d2/tests
parent[2957] Review comments. Added in the ability to configure TSIG Key (diff)
downloadkea-6e99f2cb85dd4722f7a5c2d15ebf2458cecc7b32.tar.xz
kea-6e99f2cb85dd4722f7a5c2d15ebf2458cecc7b32.zip
[2957] Made forward and reverse ddns elements optional, altered clone
method to return smart pointer.
Diffstat (limited to 'src/bin/d2/tests')
-rw-r--r--src/bin/d2/tests/d_test_stubs.cc4
-rw-r--r--src/bin/d2/tests/d_test_stubs.h13
2 files changed, 9 insertions, 8 deletions
diff --git a/src/bin/d2/tests/d_test_stubs.cc b/src/bin/d2/tests/d_test_stubs.cc
index 5d9077d3f2..4e1cee688d 100644
--- a/src/bin/d2/tests/d_test_stubs.cc
+++ b/src/bin/d2/tests/d_test_stubs.cc
@@ -260,9 +260,9 @@ DStubContext::getExtraStorage() {
return (extra_values_);
}
-DStubContext*
+DCfgContextBasePtr
DStubContext::clone() {
- return (new DStubContext(*this));
+ return (DCfgContextBasePtr(new DStubContext(*this)));
}
DStubContext::DStubContext(const DStubContext& rhs): DCfgContextBase(rhs),
diff --git a/src/bin/d2/tests/d_test_stubs.h b/src/bin/d2/tests/d_test_stubs.h
index ec23efea16..0f0084f9ed 100644
--- a/src/bin/d2/tests/d_test_stubs.h
+++ b/src/bin/d2/tests/d_test_stubs.h
@@ -521,8 +521,8 @@ public:
/// @brief Creates a clone of a DStubContext.
///
- /// @return returns a raw pointer to the new clone.
- virtual DStubContext* clone();
+ /// @return returns a pointer to the new clone.
+ virtual DCfgContextBasePtr clone();
protected:
/// @brief Copy constructor
@@ -607,10 +607,11 @@ public:
try {
config_set_ = isc::data::Element::fromJSON(json_text);
} catch (...) {
- // This is so we can diagnose parsing mistakes during test
- // development.
- std::cerr << "fromJSON failed to parse text" << json_text
+ #if 0
+ // Handy for diagnostics
+ std::cout << "fromJSON failed to parse text" << json_text
<< std::endl;
+ #endif
return (false);
}
@@ -627,8 +628,8 @@ public:
int rcode = 0;
isc::data::ConstElementPtr comment;
comment = isc::config::parseAnswer(rcode, answer_);
+ #if 0
// Handy for diagnostics
- #if 1
if (rcode != 0) {
std::cout << "checkAnswer rcode:" << rcode << " comment: "
<< *comment << std::endl;