Ticket #273: 273.diff

File 273.diff, 4.1 KB (added by jreed, 9 years ago)
  • src/lib/datasrc/tests/datasrc_unittest.cc

     
    988988TEST_F(DataSrcMatchTest, matchWithWrongClass) {
    989989    DataSrcMatch match(Name("very.very.long.example.com"), RRClass::CH());
    990990    datasrc1.findClosestEnclosure(match);
    991     EXPECT_EQ(NULL, match.getEnclosingZone());
    992     EXPECT_EQ(NULL, match.getDataSource());
     991    EXPECT_FALSE(match.getEnclosingZone());
     992    EXPECT_FALSE(match.getDataSource());
    993993}
    994994
    995995TEST_F(DataSrcMatchTest, matchWithAnyClass) {
     
    10041004
    10051005    EXPECT_EQ(RRClass::IN(), datasrc2.getClass());
    10061006    match.update(datasrc2, Name("com"));
    1007     EXPECT_EQ(NULL, match.getEnclosingZone());
    1008     EXPECT_EQ(NULL, match.getDataSource());
     1007    EXPECT_FALSE(match.getEnclosingZone());
     1008    EXPECT_FALSE(match.getDataSource());
    10091009
    10101010    EXPECT_EQ(RRClass::IN(), datasrc1.getClass());
    10111011    match.update(datasrc1, Name("example.com"));
    1012     EXPECT_EQ(NULL, match.getEnclosingZone());
    1013     EXPECT_EQ(NULL, match.getDataSource());
     1012    EXPECT_FALSE(match.getEnclosingZone());
     1013    EXPECT_FALSE(match.getDataSource());
    10141014}
    10151015
    10161016TEST_F(DataSrcMatchTest, updateAgainstAnyClass) {
     
    10461046    // An initial attempt of update with a name that doesn't match.
    10471047    // Should be ignored.
    10481048    match.update(datasrc1, Name("example.org"));
    1049     EXPECT_EQ(NULL, match.getEnclosingZone());
    1050     EXPECT_EQ(NULL, match.getDataSource());
     1049    EXPECT_FALSE(match.getEnclosingZone());
     1050    EXPECT_FALSE(match.getDataSource());
    10511051}
    10521052
    10531053TEST_F(DataSrcMatchTest, updateWithShorterMatch) {
  • src/lib/datasrc/tests/sqlite3_unittest.cc

     
    376376
    377377    DataSrcMatch match(www_name, rrclass);
    378378    data_source.findClosestEnclosure(match);
    379     EXPECT_EQ(NULL, match.getEnclosingZone());
    380     EXPECT_EQ(NULL, match.getDataSource());
     379    EXPECT_FALSE(match.getEnclosingZone());
     380    EXPECT_FALSE(match.getDataSource());
    381381}
    382382
    383383TEST_F(Sqlite3DataSourceTest, openFail) {
     
    441441TEST_F(Sqlite3DataSourceTest, findClosestEnclosureNoMatch) {
    442442    DataSrcMatch match(nomatch_name, rrclass);
    443443    data_source.findClosestEnclosure(match);
    444     EXPECT_EQ(NULL, match.getEnclosingZone());
    445     EXPECT_EQ(NULL, match.getDataSource());
     444    EXPECT_FALSE(match.getEnclosingZone());
     445    EXPECT_FALSE(match.getDataSource());
    446446}
    447447
    448448TEST_F(Sqlite3DataSourceTest, findClosestClassMismatch) {
    449449    DataSrcMatch match(nomatch_name, rrclass);
    450450    data_source.findClosestEnclosure(match);
    451     EXPECT_EQ(NULL, match.getEnclosingZone());
    452     EXPECT_EQ(NULL, match.getDataSource());
     451    EXPECT_FALSE(match.getEnclosingZone());
     452    EXPECT_FALSE(match.getDataSource());
    453453}
    454454
    455455// If the query class is ANY, the result should be the same as the case where
  • src/lib/datasrc/tests/static_unittest.cc

     
    214214TEST_F(StaticDataSourceTest, findClosestEnclosureForVersionClassMismatch) {
    215215    DataSrcMatch match(version_name, RRClass::IN());
    216216    data_source.findClosestEnclosure(match);
    217     EXPECT_EQ(NULL, match.getEnclosingZone());
    218     EXPECT_EQ(NULL, match.getDataSource());
     217    EXPECT_FALSE(match.getEnclosingZone());
     218    EXPECT_FALSE(match.getDataSource());
    219219}
    220220
    221221TEST_F(StaticDataSourceTest, findClosestEnclosureForVersionPartial) {
     
    242242TEST_F(StaticDataSourceTest, findClosestEnclosureNoMatch) {
    243243    DataSrcMatch match(nomatch_name, rrclass);
    244244    data_source.findClosestEnclosure(match);
    245     EXPECT_EQ(NULL, match.getEnclosingZone());
    246     EXPECT_EQ(NULL, match.getDataSource());
     245    EXPECT_FALSE(match.getEnclosingZone());
     246    EXPECT_FALSE(match.getDataSource());
    247247}
    248248
    249249TEST_F(StaticDataSourceTest, findRRsetVersionTXT) {