int main() { mongo conn[1]; char version[10]; INIT_SOCKETS_FOR_WINDOWS; test_write_concern_finish( ); if( mongo_client( conn, TEST_SERVER, 27017 ) != MONGO_OK ) { printf( "failed to connect\n" ); exit( 1 ); } ASSERT( conn->write_concern != (void*)0 ); test_insert( conn ); if( mongo_get_server_version( version ) != -1 && version[0] != '1' ) { test_write_concern_input( conn ); test_update_and_remove( conn ); test_batch_insert_with_continue( conn ); } mongo_destroy( conn ); return 0; }
int main(int argc, char *argv[]) { const char * test_server = (argc > 1 ? argv[1] : TEST_SERVER); mongo conn[1]; char version[10]; INIT_SOCKETS_FOR_WINDOWS; test_write_concern_finish( ); CONN_CLIENT_TEST; ASSERT( conn->write_concern != (void*)0 ); test_insert( conn ); if( mongo_get_server_version( version ) != -1 && version[0] != '1' ) { test_write_concern_input( conn ); test_update_and_remove( conn ); test_batch_insert_with_continue( conn ); } mongo_destroy( conn ); test_write_concern_api(); return 0; }
int main(int argc, char **argv) { mongo conn[1]; char version[10]; GETSERVERNAME; INIT_SOCKETS_FOR_WINDOWS; test_write_concern_finish( ); CONN_CLIENT_TEST(_servername); ASSERT( conn->write_concern != (void*)0 ); test_insert( conn ); if( mongo_get_server_version( version ) != -1 && version[0] != '1' ) { // test_write_concern_input( conn ); test_update_and_remove( conn ); test_batch_insert_with_continue( conn ); } mongo_destroy( conn ); test_write_concern_api(); return 0; }