Skip to content

Commit 3af8619

Browse files
committed
Adjust test_sniffer.cxx
Avoid use of implicit constructor (cherry picked from commit 5319787)
1 parent 8f69079 commit 3af8619

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

net/httpsniff/test/test_sniffer.cxx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
class TDecodeTest : public TRootSniffer {
1818
public:
19+
TDecodeTest() : TRootSniffer("sniffer") {}
20+
1921
std::string Decode(const char *value, Bool_t remove_quotes = kTRUE)
2022
{
2123
TString res = DecodeUrlOptionValue(value, remove_quotes);
@@ -66,7 +68,7 @@ TEST(TRootSniffer, root_json)
6668
{
6769
TNamed obj("obj", "title");
6870

69-
TRootSnifferFull sniffer;
71+
TRootSnifferFull sniffer("sniffer");
7072

7173
sniffer.RegisterObject("/", &obj);
7274

@@ -86,7 +88,7 @@ TEST(TRootSniffer, root_xml)
8688
{
8789
TNamed obj("obj", "title");
8890

89-
TRootSnifferFull sniffer;
91+
TRootSnifferFull sniffer("sniffer");
9092

9193
sniffer.RegisterObject("/", &obj);
9294

@@ -106,7 +108,7 @@ TEST(TRootSniffer, root_bin)
106108
{
107109
TNamed obj("obj", "title");
108110

109-
TRootSnifferFull sniffer;
111+
TRootSnifferFull sniffer("sniffer");
110112

111113
sniffer.RegisterObject("/", &obj);
112114

@@ -121,7 +123,7 @@ TEST(TRootSniffer, file_root)
121123
{
122124
TNamed obj("obj", "title");
123125

124-
TRootSnifferFull sniffer;
126+
TRootSnifferFull sniffer("sniffer");
125127

126128
sniffer.RegisterObject("/", &obj);
127129

@@ -135,7 +137,7 @@ TEST(TRootSniffer, item_json)
135137
{
136138
TNamed obj("obj", "title");
137139

138-
TRootSnifferFull sniffer;
140+
TRootSnifferFull sniffer("sniffer");
139141

140142
sniffer.RegisterObject("/", &obj);
141143

@@ -155,7 +157,7 @@ TEST(TRootSniffer, exe_json)
155157
{
156158
TNamed obj("obj","title");
157159

158-
TRootSnifferFull sniffer;
160+
TRootSnifferFull sniffer("sniffer");
159161

160162
sniffer.RegisterObject("/", &obj);
161163

@@ -190,7 +192,7 @@ TEST(TRootSniffer, exe_post_json)
190192
json = TBufferJSON::ToJSON(&hist2).Data();
191193
}
192194

193-
TRootSnifferFull sniffer;
195+
TRootSnifferFull sniffer("sniffer");
194196

195197
sniffer.RegisterObject("/", &hist);
196198

@@ -219,7 +221,7 @@ TEST(TRootSniffer, set_title)
219221
{
220222
TNamed obj("obj", "title");
221223

222-
TRootSnifferFull sniffer;
224+
TRootSnifferFull sniffer("sniffer");
223225
// disable readonly to get method executed
224226
sniffer.SetReadOnly(kFALSE);
225227

@@ -252,7 +254,7 @@ TEST(TRootSniffer, cmd_json)
252254
{
253255
TNamed obj("obj", "title");
254256

255-
TRootSnifferFull sniffer;
257+
TRootSnifferFull sniffer("sniffer");
256258
sniffer.SetReadOnly(kFALSE);
257259

258260
sniffer.RegisterObject("/", &obj);
@@ -302,7 +304,7 @@ TEST(TRootSniffer, multi_json)
302304
TNamed obj1("obj1", "title1");
303305
TNamed obj2("obj2", "title2");
304306

305-
TRootSnifferFull sniffer;
307+
TRootSnifferFull sniffer("sniffer");
306308

307309
sniffer.RegisterObject("/", &obj1);
308310
sniffer.RegisterObject("/", &obj2);

0 commit comments

Comments
 (0)