src/base/addr_range_map.test.cc
// Converted from legacy unit test framework
Converted from legacy unit test framework
Converted from legacy unit test framework
TEST(AddrRangeMapTest, LegacyTests)
{
    AddrRangeMap<int> r;
    AddrRangeMap<int>::const_iterator i;
    i = r.insert(RangeIn(10, 40), 5);
    ASSERT_NE(i, r.end());
    i = r.insert(RangeIn(60, 90), 3);
    ASSERT_NE(i, r.end());
    EXPECT_NE(r.intersects(RangeIn(20, 30)), r.end());
    EXPECT_EQ(r.contains(RangeIn(55, 55)), r.end());
    EXPECT_EQ(r.intersects(RangeIn(55, 55)), r.end());
    i = r.insert(RangeIn(0, 12), 1);
    EXPECT_EQ(i, r.end());
    i = r.insert(RangeIn(0, 9), 1);
    ASSERT_NE(i, r.end());
    EXPECT_NE(r.contains(RangeIn(20, 30)), r.end());
}
TEST ( AddrRangeMapTest , LegacyTests ) { AddrRangeMap < int > r ; AddrRangeMap < int > :: const_iterator i ; i = r . insert ( RangeIn ( 10 , 40 ) , 5 ) ; ASSERT_NE ( i , r . end ( ) ) ; i = r . insert ( RangeIn ( 60 , 90 ) , 3 ) ; ASSERT_NE ( i , r . end ( ) ) ; EXPECT_NE ( r . intersects ( RangeIn ( 20 , 30 ) ) , r . end ( ) ) ; EXPECT_EQ ( r . contains ( RangeIn ( 55 , 55 ) ) , r . end ( ) ) ; EXPECT_EQ ( r . intersects ( RangeIn ( 55 , 55 ) ) , r . end ( ) ) ; i = r . insert ( RangeIn ( 0 , 12 ) , 1 ) ; EXPECT_EQ ( i , r . end ( ) ) ; i = r . insert ( RangeIn ( 0 , 9 ) , 1 ) ; ASSERT_NE ( i , r . end ( ) ) ; EXPECT_NE ( r . contains ( RangeIn ( 20 , 30 ) ) , r . end ( ) ) ; }
Converted from legacy unit test framework
Converted from legacy unit test framework