<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p>Dear folks</p><p><o:p> </o:p></p><p>I disagree with applying rule 2.6 to this case. It would create a third convention that is inconsistent with the first two.</p><p>20150901 conference call decides that any new unit test naming convention is required on new test suites only, which means the inconsistency will be there forever.</p><p><o:p> </o:p></p><p>My proposal below is an extension of the current convention.</p><p>Any test suite that conforms to the current convention also conforms to my proposal, which ensures only two conventions exist. </p><p><o:p> </o:p></p><p>Yours, Junxiao</p><p><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p style='border:none;padding:0in'><br><b>From: </b>Davide Pesavento<br><b>Sent: </b>Wednesday, September 16, 2015 08:04<br><b>To: </b>Junxiao Shi<br><b>Cc: </b><br><b>Subject: </b>Re: [Nfd-dev] UnitTesting naming convention: test suite nameconflicts with class name</p></div><p class=MsoNormal><span style='font-family:"Times New Roman",serif'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If I remember correctly BOOST_AUTO_TEST_SUITE declares a namespace,</p><p class=MsoNormal>not a class. According to rule 2.6, namespace names should start with</p><p class=MsoNormal>a lowercase letter. In any case, we should avoid name clashes even</p><p class=MsoNormal>between classes and namespaces.</p><p><o:p> </o:p></p><p><o:p> </o:p></p><p><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p style='border:none;padding:0in'><br><b>From: </b>Junxiao Shi<br><b>Sent: </b>Wednesday, September 16, 2015 07:01<br><b>To: </b><br><b>Subject: </b>UnitTesting naming convention: test suite name conflicts with classname<o:p></o:p></p></div><p class=MsoNormal><span style='font-family:"Times New Roman",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Times New Roman",serif'><o:p> </o:p></span></p><p>Dear folks<o:p></o:p></p><p><o:p> </o:p></p><p>Since 20150901 we have adopted a new naming conventions for unit test suites: <a href="http://redmine.named-data.net/projects/nfd/wiki/UnitTesting/6">http://redmine.named-data.net/projects/nfd/wiki/UnitTesting/6</a> <o:p></o:p></p><p>For example, a test suite for ndn::util::Signal should be named: Util/TestSignal.<o:p></o:p></p><p><o:p> </o:p></p><p>Under this rule, a test suite for ndn::security::pib::Pib should be named: Security/Pib/TestPib.<o:p></o:p></p><p>In Boost.Test, this is written as:<o:p></o:p></p><p><span style='font-family:Consolas'>BOOST_AUTO_TEST_SUITE(Security)<o:p></o:p></span></p><p><span style='font-family:Consolas'>BOOST_AUTO_TEST_SUITE(Pib)<o:p></o:p></span></p><p><span style='font-family:Consolas'>BOOST_AUTO_TEST_SUITE(TestPib)<o:p></o:p></span></p><p><o:p> </o:p></p><p>Each of these BOOST_AUTO_TEST_SUITE macros would declare a class named after the test suite name.<o:p></o:p></p><p>This causes the identifier “Pib” ambiguous: it refers to not only the class under test (ndn::security::pib::Pib), but also the second level test suite.<o:p></o:p></p><p><o:p> </o:p></p><p>Yingdi gave two proposals:<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'>1.<span style='font-size:7.0pt;font-family:"Times New Roman",serif'>       </span>name the test suite as Security/PibDir/TestPib<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'>2.<span style='font-size:7.0pt;font-family:"Times New Roman",serif'>       </span>name the test suite as security/pib/TestPib<o:p></o:p></p><p><o:p> </o:p></p><p>My proposal is:<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'><span style='font-family:Symbol'>·</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>         </span>name the test suite as Security/TestPib/TestPib<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'><span style='font-family:Symbol'>·</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>         </span>due to the existence of Pib class, all test suites for ndn::security::pib::* should have its second level named “TestPib” rather than “Pib”<o:p></o:p></p><p><o:p> </o:p></p><p>My reason is:<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'><span style='font-family:Symbol'>·</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>         </span>Yingdi’s second proposal resolves the name conflict between test suite name and class name, but it creates another conflict: “pib” refers to both the test suite and the namespace ndn::security::pib.<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'><span style='font-family:Symbol'>·</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>         </span>Although Yingdi’s first proposal prevents the name conflict, it’s using two different rules to resolve the conflict: (a) append “Dir” (b) prepend “Test”. The purpose for prepending “Test” to the lowest-level test suite name is to resolve the name conflict, so we should reuse the same rule for resolving all conflicts.<o:p></o:p></p><p style='margin-left:.5in;text-indent:-.25in'><span style='font-family:Symbol'>·</span><span style='font-size:7.0pt;font-family:"Times New Roman",serif'>         </span>Having “TestPib” on two levels should be fine, because this class name is never referred to in the testing code.<o:p></o:p></p><p><o:p> </o:p></p><p><o:p> </o:p></p><p>Yours, Junxiao</p></div></body></html>