This commit is contained in:
gwenn 2017-02-07 19:52:52 +01:00
parent 59111b783d
commit 7014dd6260

View File

@ -23,7 +23,7 @@ impl Connection {
#[cfg(test)] #[cfg(test)]
mod test { mod test {
use ffi::Limit; use ffi::{self, Limit};
use Connection; use Connection;
#[test] #[test]
@ -59,7 +59,8 @@ mod test {
db.set_limit(Limit::SQLITE_LIMIT_TRIGGER_DEPTH, 32); db.set_limit(Limit::SQLITE_LIMIT_TRIGGER_DEPTH, 32);
assert_eq!(32, db.limit(Limit::SQLITE_LIMIT_TRIGGER_DEPTH)); assert_eq!(32, db.limit(Limit::SQLITE_LIMIT_TRIGGER_DEPTH));
if version_number() >= 3008007 { let version = unsafe { ffi::sqlite3_libversion_number() };
if version >= 3008007 {
db.set_limit(Limit::SQLITE_LIMIT_WORKER_THREADS, 2); db.set_limit(Limit::SQLITE_LIMIT_WORKER_THREADS, 2);
assert_eq!(2, db.limit(Limit::SQLITE_LIMIT_WORKER_THREADS)); assert_eq!(2, db.limit(Limit::SQLITE_LIMIT_WORKER_THREADS));
} }