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

[2522] avoid initializing std::string at a namescope level to avoid fiasco.

also constify one other object.
parent 1e1f87c3
......@@ -34,14 +34,13 @@ using namespace isc::dns;
using namespace isc::dns::rdata;
namespace {
const string too_long_label =
"0123456789012345678901234567890123456789012345678901234567890123.";
class Rdata_MINFO_Test : public RdataTest {
protected:
Rdata_MINFO_Test():
minfo_txt("rmailbox.example.com. emailbox.example.com."),
minfo_txt2("root.example.com. emailbox.example.com."),
too_long_label("01234567890123456789012345678901234567"
"89012345678901234567890123."),
rdata_minfo(minfo_txt),
rdata_minfo2(minfo_txt2)
{}
......@@ -85,6 +84,7 @@ protected:
const string minfo_txt;
const string minfo_txt2;
const string too_long_label;
const generic::MINFO rdata_minfo;
const generic::MINFO rdata_minfo2;
};
......@@ -100,7 +100,7 @@ TEST_F(Rdata_MINFO_Test, createFromText) {
checkFromText_None(minfo_txt);
// origin defined for lexer constructor, but not string constructor
Name origin("example.com");
const Name origin("example.com");
checkFromText_Origin("rmailbox emailbox", &origin);
// lexer constructor accepts extra text, but string constructor doesn't
......
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