Commit ba66913e authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac613] made sure some of class member variables are initialized in the constructor.

parent 59455cd6
......@@ -33,7 +33,9 @@ using namespace asiolink;
// or not.
class IntervalTimerTest : public ::testing::Test {
protected:
IntervalTimerTest() : io_service_() {}
IntervalTimerTest() :
io_service_(), timer_called_(false), timer_cancel_success_(false)
{}
~IntervalTimerTest() {}
class TimerCallBack : public std::unary_function<void, void> {
public:
......@@ -64,7 +66,8 @@ protected:
TimerCallBackCancelDeleter(IntervalTimerTest* test_obj,
IntervalTimer* timer,
TimerCallBackCounter& counter)
: test_obj_(test_obj), timer_(timer), counter_(counter), count_(0)
: test_obj_(test_obj), timer_(timer), counter_(counter), count_(0),
prev_counter_(-1)
{}
void operator()() {
++count_;
......
......@@ -279,6 +279,7 @@ protected:
DNSLookup* lookup = NULL,
DNSAnswer* answer = NULL) :
io_(io_service),
done_(false),
message_(new Message(Message::PARSE)),
answer_message_(new Message(Message::RENDER)),
respbuf_(new OutputBuffer(0)),
......@@ -412,7 +413,8 @@ protected:
};
RecursiveQueryTest::RecursiveQueryTest() :
dns_service_(NULL), callback_(NULL), sock_(-1), res_(NULL)
dns_service_(NULL), callback_(NULL), callback_protocol_(0),
callback_native_(-1), sock_(-1), res_(NULL)
{
io_service_ = new IOService();
setDNSService(true, true);
......
......@@ -56,7 +56,7 @@ const size_t Name::MAX_LABELS;
namespace {
class RBTreeTest : public::testing::Test {
protected:
RBTreeTest() : rbtree_expose_empty_node(true) {
RBTreeTest() : rbtree_expose_empty_node(true), crbtnode(NULL) {
const char* const domain_names[] = {
"c", "b", "a", "x.d.e.f", "z.d.e.f", "g.h", "i.g.h", "o.w.y.d.e.f",
"j.z.d.e.f", "p.w.y.d.e.f", "q.w.y.d.e.f"};
......
......@@ -113,10 +113,8 @@ public:
vector<RRsetPtr> rrsets_[NUM_SECTIONS];
ConstEDNSPtr edns_;
#ifdef notyet
// tsig/sig0: TODO
RRsetsSorter* sorter_;
#endif
// RRsetsSorter* sorter_; : TODO
void init();
void setOpcode(const Opcode& opcode);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment