Exemple #1
0
 TEST( UpdateIndexDataTest, AllPathsIndexed1 ) {
     UpdateIndexData a;
     a.allPathsIndexed();
     ASSERT_TRUE( a.mightBeIndexed( "a" ) );
     a.clear();
     ASSERT_FALSE( a.mightBeIndexed( "a" ) );
 }
Exemple #2
0
 TEST( UpdateIndexDataTest, Simple2 ) {
     UpdateIndexData a;
     a.addPath( "ab" );
     ASSERT_FALSE( a.mightBeIndexed( "a" ) );
     a.clear();
     ASSERT_FALSE( a.mightBeIndexed( "ab" ) );
 }
Exemple #3
0
 TEST( UpdateIndexDataTest, AllPathsIndexed2 ) {
     UpdateIndexData a;
     a.allPathsIndexed();
     ASSERT_TRUE( a.mightBeIndexed( "a" ) );
     ASSERT_TRUE( a.mightBeIndexed( "" ) );
     a.addPathComponent( "a" );
     ASSERT_TRUE( a.mightBeIndexed( "a" ) );
     ASSERT_TRUE( a.mightBeIndexed( "b" ) );
     a.clear();
     ASSERT_FALSE( a.mightBeIndexed( "a" ) );
 }
Exemple #4
0
 TEST( UpdateIndexDataTest, Component1 ) {
     UpdateIndexData a;
     a.addPathComponent( "a" );
     ASSERT_FALSE( a.mightBeIndexed( "" ) );
     ASSERT_TRUE( a.mightBeIndexed( "a" ) );
     ASSERT_TRUE( a.mightBeIndexed( "b.a" ) );
     ASSERT_TRUE( a.mightBeIndexed( "a.b" ) );
     ASSERT_TRUE( a.mightBeIndexed( "b.a.c" ) );
     ASSERT_FALSE( a.mightBeIndexed( "b.c" ) );
     ASSERT_FALSE( a.mightBeIndexed( "ab" ) );
     a.clear();
     ASSERT_FALSE( a.mightBeIndexed( "a" ) );
 }
Exemple #5
0
    TEST( UpdateIndexDataTest, Simple1 ) {
        UpdateIndexData a;
        a.addPath( "a.b" );
        ASSERT_TRUE( a.mightBeIndexed( "a.b" ) );
        ASSERT_TRUE( a.mightBeIndexed( "a" ) );
        ASSERT_TRUE( a.mightBeIndexed( "a.b.c" ) );
        ASSERT_TRUE( a.mightBeIndexed( "a.$.b" ) );

        ASSERT_FALSE( a.mightBeIndexed( "b" ) );
        ASSERT_FALSE( a.mightBeIndexed( "a.c" ) );

        a.clear();
        ASSERT_FALSE( a.mightBeIndexed( "a.b" ) );
    }