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

[2836] style fixes: unify short lines

parent 929f85f8
......@@ -191,16 +191,12 @@ TEST_F(RdataSetTest, mergeCreate) {
SCOPED_TRACE("creating merge case " + lexical_cast<string>(i) +
", " + lexical_cast<string>(j));
// Create old rdataset
SegmentObjectHolder<RdataSet, RRClass> holder1(
mem_sgmt_,
rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder1(mem_sgmt_, rrclass);
holder1.set(RdataSet::create(mem_sgmt_, encoder_,
(i & 1) != 0 ? a_rrsets[0] : null_rrset,
(i & 2) != 0 ? rrsig_rrsets[0] : null_rrset));
// Create merged rdataset, based on the old one and RRsets
SegmentObjectHolder<RdataSet, RRClass> holder2(
mem_sgmt_,
rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder2(mem_sgmt_, rrclass);
holder2.set(RdataSet::create(mem_sgmt_, encoder_,
(j & 1) != 0 ? a_rrsets[1] : null_rrset,
(j & 2) != 0 ? rrsig_rrsets[1] : null_rrset,
......@@ -241,14 +237,12 @@ TEST_F(RdataSetTest, duplicate) {
// After suppressing duplicates, it should be the same as the default
// RdataSet. Check that.
SegmentObjectHolder<RdataSet, RRClass> holder1(
mem_sgmt_, rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder1(mem_sgmt_, rrclass);
holder1.set(RdataSet::create(mem_sgmt_, encoder_, dup_rrset, dup_rrsig));
checkRdataSet(*holder1.get(), def_rdata_txt_, def_rrsig_txt_);
// Confirm the same thing for the merge mode.
SegmentObjectHolder<RdataSet, RRClass> holder2(
mem_sgmt_, rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder2(mem_sgmt_, rrclass);
holder2.set(RdataSet::create(mem_sgmt_, encoder_, a_rrset_, rrsig_rrset_,
holder1.get()));
checkRdataSet(*holder2.get(), def_rdata_txt_, def_rrsig_txt_);
......@@ -275,23 +269,19 @@ TEST_F(RdataSetTest, getNext) {
TEST_F(RdataSetTest, find) {
// Create some RdataSets and make a chain of them.
SegmentObjectHolder<RdataSet, RRClass> holder1(
mem_sgmt_, RRClass::IN());
SegmentObjectHolder<RdataSet, RRClass> holder1(mem_sgmt_, RRClass::IN());
holder1.set(RdataSet::create(mem_sgmt_, encoder_, a_rrset_,
ConstRRsetPtr()));
ConstRRsetPtr aaaa_rrset =
textToRRset("www.example.com. 1076895760 IN AAAA 2001:db8::1");
SegmentObjectHolder<RdataSet, RRClass> holder2(
mem_sgmt_,
RRClass::IN());
SegmentObjectHolder<RdataSet, RRClass> holder2(mem_sgmt_, RRClass::IN());
holder2.set(RdataSet::create(mem_sgmt_, encoder_, aaaa_rrset,
ConstRRsetPtr()));
ConstRRsetPtr sigonly_rrset =
textToRRset("www.example.com. 1076895760 IN RRSIG "
"TXT 5 2 3600 20120814220826 20120715220826 "
"1234 example.com. FAKE");
SegmentObjectHolder<RdataSet, RRClass> holder3(
mem_sgmt_, RRClass::IN());
SegmentObjectHolder<RdataSet, RRClass> holder3(mem_sgmt_, RRClass::IN());
holder3.set(RdataSet::create(mem_sgmt_, encoder_, ConstRRsetPtr(),
sigonly_rrset));
......@@ -377,8 +367,7 @@ TEST_F(RdataSetTest, createManyRRs) {
TEST_F(RdataSetTest, mergeCreateManyRRs) {
ConstRRsetPtr rrset = textToRRset("example.com. 3600 IN TXT some-text");
SegmentObjectHolder<RdataSet, RRClass> holder(
mem_sgmt_, RRClass::IN());
SegmentObjectHolder<RdataSet, RRClass> holder(mem_sgmt_, RRClass::IN());
holder.set(RdataSet::create(mem_sgmt_, encoder_, rrset, ConstRRsetPtr()));
checkCreateManyRRs(boost::bind(&RdataSet::create, _1, _2, _3, _4,
......@@ -474,8 +463,7 @@ TEST_F(RdataSetTest, mergeCreateManyRRSIGs) {
ConstRRsetPtr rrsig = textToRRset(
"example.com. 3600 IN RRSIG A 5 2 3600 20120814220826 20120715220826 "
"1234 example.com. FAKEFAKE");
SegmentObjectHolder<RdataSet, RRClass> holder(
mem_sgmt_, rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder(mem_sgmt_, rrclass);
holder.set(RdataSet::create(mem_sgmt_, encoder_, ConstRRsetPtr(), rrsig));
checkCreateManyRRSIGs(boost::bind(&RdataSet::create, _1, _2, _3, _4,
......@@ -542,8 +530,7 @@ TEST_F(RdataSetTest, badCreate) {
TEST_F(RdataSetTest, badMergeCreate) {
// The 'old RdataSet' for merge. Its content doesn't matter much; the test
// should trigger exception before examining it except for the last checks.
SegmentObjectHolder<RdataSet, RRClass> holder(
mem_sgmt_, RRClass::IN());
SegmentObjectHolder<RdataSet, RRClass> holder(mem_sgmt_, RRClass::IN());
holder.set(RdataSet::create(mem_sgmt_, encoder_,
textToRRset("www.example.com. 0 IN AAAA 2001:db8::1"),
ConstRRsetPtr()));
......@@ -583,8 +570,7 @@ TEST_F(RdataSetTest, varyingTTL) {
RdataSet::destroy(mem_sgmt_, rdataset, rrclass);
// RRSIG's TTL is smaller
SegmentObjectHolder<RdataSet, RRClass> holder1(
mem_sgmt_, rrclass);
SegmentObjectHolder<RdataSet, RRClass> holder1(mem_sgmt_, rrclass);
holder1.set(RdataSet::create(mem_sgmt_, encoder_, aaaa_large, sig_small));
EXPECT_EQ(RRTTL(10), restoreTTL(holder1.get()->getTTLData()));
......
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