@ -1029,10 +1029,14 @@ TEST_F(ColumnFamilyTest, CreateMissingColumnFamilies) {
TEST_F ( ColumnFamilyTest , SanitizeOptions ) {
TEST_F ( ColumnFamilyTest , SanitizeOptions ) {
DBOptions db_options ;
DBOptions db_options ;
for ( int s = kCompactionStyleLevel ; s < = kCompactionStyleUniversal ; + + s ) {
for ( int l = 0 ; l < = 2 ; l + + ) {
for ( int i = 1 ; i < = 3 ; i + + ) {
for ( int i = 1 ; i < = 3 ; i + + ) {
for ( int j = 1 ; j < = 3 ; j + + ) {
for ( int j = 1 ; j < = 3 ; j + + ) {
for ( int k = 1 ; k < = 3 ; k + + ) {
for ( int k = 1 ; k < = 3 ; k + + ) {
ColumnFamilyOptions original ;
ColumnFamilyOptions original ;
original . compaction_style = static_cast < CompactionStyle > ( s ) ;
original . num_levels = l ;
original . level0_stop_writes_trigger = i ;
original . level0_stop_writes_trigger = i ;
original . level0_slowdown_writes_trigger = j ;
original . level0_slowdown_writes_trigger = j ;
original . level0_file_num_compaction_trigger = k ;
original . level0_file_num_compaction_trigger = k ;
@ -1044,6 +1048,16 @@ TEST_F(ColumnFamilyTest, SanitizeOptions) {
result . level0_file_num_compaction_trigger ) ;
result . level0_file_num_compaction_trigger ) ;
ASSERT_TRUE ( result . level0_file_num_compaction_trigger = =
ASSERT_TRUE ( result . level0_file_num_compaction_trigger = =
original . level0_file_num_compaction_trigger ) ;
original . level0_file_num_compaction_trigger ) ;
if ( s = = kCompactionStyleLevel ) {
ASSERT_GE ( result . num_levels , 2 ) ;
} else {
ASSERT_GE ( result . num_levels , 1 ) ;
if ( original . num_levels > = 1 ) {
ASSERT_EQ ( result . num_levels , original . num_levels ) ;
}
}
}
}
}
}
}
}
}
}