mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-19 12:29:34 +08:00
Fix non-bundled tests against macOS system SQLite
This commit is contained in:
@@ -5,17 +5,16 @@ use rusqlite::ffi;
|
||||
use rusqlite::Connection;
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_error_when_singlethread_mode() {
|
||||
// put SQLite into single-threaded mode
|
||||
unsafe {
|
||||
// Note: macOS system SQLite seems to return an error if you attempt to
|
||||
// reconfigure to single-threaded mode.
|
||||
if ffi::sqlite3_config(ffi::SQLITE_CONFIG_SINGLETHREAD) != ffi::SQLITE_OK {
|
||||
return;
|
||||
}
|
||||
if ffi::sqlite3_initialize() != ffi::SQLITE_OK {
|
||||
return;
|
||||
}
|
||||
assert_eq!(ffi::sqlite3_initialize(), ffi::SQLITE_OK);
|
||||
}
|
||||
|
||||
let _ = Connection::open_in_memory().unwrap();
|
||||
let res = Connection::open_in_memory();
|
||||
assert!(res.is_err());
|
||||
}
|
||||
|
Reference in New Issue
Block a user