@ -306,6 +306,60 @@ if(LEVELDB_BUILD_TESTS)
A P P E N D P R O P E R T Y C O M P I L E _ O P T I O N S - W n o - m i s s i n g - f i e l d - i n i t i a l i z e r s )
A P P E N D P R O P E R T Y C O M P I L E _ O P T I O N S - W n o - m i s s i n g - f i e l d - i n i t i a l i z e r s )
endif ( LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS )
endif ( LEVELDB_HAVE_NO_MISSING_FIELD_INITIALIZERS )
add_executable ( leveldb_tests "" )
target_sources ( leveldb_tests
P R I V A T E
# " d b / f a u l t _ i n j e c t i o n _ t e s t . c c "
# " i s s u e s / i s s u e 1 7 8 _ t e s t . c c "
# " i s s u e s / i s s u e 2 0 0 _ t e s t . c c "
# " i s s u e s / i s s u e 3 2 0 _ t e s t . c c "
" $ { P R O J E C T _ B I N A R Y _ D I R } / $ { L E V E L D B _ P O R T _ C O N F I G _ D I R } / p o r t _ c o n f i g . h "
# " u t i l / e n v _ t e s t . c c "
" u t i l / s t a t u s _ t e s t . c c "
" u t i l / n o _ d e s t r u c t o r _ t e s t . c c "
" u t i l / t e s t u t i l . c c "
" u t i l / t e s t u t i l . h "
)
if ( NOT BUILD_SHARED_LIBS )
target_sources ( leveldb_tests
P R I V A T E
" d b / a u t o c o m p a c t _ t e s t . c c "
" d b / c o r r u p t i o n _ t e s t . c c "
" d b / d b _ t e s t . c c "
" d b / d b f o r m a t _ t e s t . c c "
" d b / f i l e n a m e _ t e s t . c c "
" d b / l o g _ t e s t . c c "
" d b / r e c o v e r y _ t e s t . c c "
" d b / s k i p l i s t _ t e s t . c c "
" d b / v e r s i o n _ e d i t _ t e s t . c c "
" d b / v e r s i o n _ s e t _ t e s t . c c "
" d b / w r i t e _ b a t c h _ t e s t . c c "
" h e l p e r s / m e m e n v / m e m e n v _ t e s t . c c "
" t a b l e / f i l t e r _ b l o c k _ t e s t . c c "
" t a b l e / t a b l e _ t e s t . c c "
" u t i l / a r e n a _ t e s t . c c "
" u t i l / b l o o m _ t e s t . c c "
" u t i l / c a c h e _ t e s t . c c "
" u t i l / c o d i n g _ t e s t . c c "
" u t i l / c r c 3 2 c _ t e s t . c c "
" u t i l / h a s h _ t e s t . c c "
" u t i l / l o g g i n g _ t e s t . c c "
)
endif ( NOT BUILD_SHARED_LIBS )
target_link_libraries ( leveldb_tests leveldb gmock gtest gtest_main )
target_compile_definitions ( leveldb_tests
P R I V A T E
$ { L E V E L D B _ P L A T F O R M _ N A M E } = 1
)
if ( NOT HAVE_CXX17_HAS_INCLUDE )
target_compile_definitions ( leveldb_tests
P R I V A T E
L E V E L D B _ H A S _ P O R T _ C O N F I G _ H = 1
)
endif ( NOT HAVE_CXX17_HAS_INCLUDE )
add_test ( NAME "leveldb_tests" COMMAND "leveldb_tests" )
function ( leveldb_test test_file )
function ( leveldb_test test_file )
get_filename_component ( test_target_name "${test_file}" NAME_WE )
get_filename_component ( test_target_name "${test_file}" NAME_WE )
@ -334,42 +388,8 @@ if(LEVELDB_BUILD_TESTS)
endfunction ( leveldb_test )
endfunction ( leveldb_test )
leveldb_test ( "db/c_test.c" )
leveldb_test ( "db/c_test.c" )
leveldb_test ( "db/fault_injection_test.cc" )
leveldb_test ( "issues/issue178_test.cc" )
leveldb_test ( "issues/issue200_test.cc" )
leveldb_test ( "issues/issue320_test.cc" )
leveldb_test ( "util/env_test.cc" )
leveldb_test ( "util/status_test.cc" )
leveldb_test ( "util/no_destructor_test.cc" )
if ( NOT BUILD_SHARED_LIBS )
if ( NOT BUILD_SHARED_LIBS )
leveldb_test ( "db/autocompact_test.cc" )
leveldb_test ( "db/corruption_test.cc" )
leveldb_test ( "db/db_test.cc" )
leveldb_test ( "db/dbformat_test.cc" )
leveldb_test ( "db/filename_test.cc" )
leveldb_test ( "db/log_test.cc" )
leveldb_test ( "db/recovery_test.cc" )
leveldb_test ( "db/skiplist_test.cc" )
leveldb_test ( "db/version_edit_test.cc" )
leveldb_test ( "db/version_set_test.cc" )
leveldb_test ( "db/write_batch_test.cc" )
leveldb_test ( "helpers/memenv/memenv_test.cc" )
leveldb_test ( "table/filter_block_test.cc" )
leveldb_test ( "table/table_test.cc" )
leveldb_test ( "util/arena_test.cc" )
leveldb_test ( "util/bloom_test.cc" )
leveldb_test ( "util/cache_test.cc" )
leveldb_test ( "util/coding_test.cc" )
leveldb_test ( "util/crc32c_test.cc" )
leveldb_test ( "util/hash_test.cc" )
leveldb_test ( "util/logging_test.cc" )
# TODO ( costan ) : T h i s t e s t a l s o u s e s
# TODO ( costan ) : T h i s t e s t a l s o u s e s
# " u t i l / e n v _ { p o s i x | w i n d o w s } _ t e s t _ h e l p e r . h "
# " u t i l / e n v _ { p o s i x | w i n d o w s } _ t e s t _ h e l p e r . h "
if ( WIN32 )
if ( WIN32 )