mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-06-25 21:11:32 +00:00
Make a cosmetic adjustment
This commit is contained in:
26
tests/lib.rs
26
tests/lib.rs
@ -134,6 +134,19 @@ fn cursor_workflow() {
|
||||
assert_eq!(ok!(select.next()), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statement_bind() {
|
||||
let connection = setup_users(":memory:");
|
||||
let statement = "INSERT INTO users (id, name, age, photo) VALUES (?, ?, ?, ?)";
|
||||
let mut statement = ok!(connection.prepare(statement));
|
||||
|
||||
ok!(statement.bind(1, 2i64));
|
||||
ok!(statement.bind(2, "Bob"));
|
||||
ok!(statement.bind(3, 69.42));
|
||||
ok!(statement.bind(4, &[0x69u8, 0x42u8][..]));
|
||||
assert_eq!(ok!(statement.next()), State::Done);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statement_count() {
|
||||
let connection = setup_users(":memory:");
|
||||
@ -175,19 +188,6 @@ fn statement_kind() {
|
||||
assert_eq!(statement.kind(3), Type::Binary);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statement_bind() {
|
||||
let connection = setup_users(":memory:");
|
||||
let statement = "INSERT INTO users (id, name, age, photo) VALUES (?, ?, ?, ?)";
|
||||
let mut statement = ok!(connection.prepare(statement));
|
||||
|
||||
ok!(statement.bind(1, 2i64));
|
||||
ok!(statement.bind(2, "Bob"));
|
||||
ok!(statement.bind(3, 69.42));
|
||||
ok!(statement.bind(4, &[0x69u8, 0x42u8][..]));
|
||||
assert_eq!(ok!(statement.next()), State::Done);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statement_read() {
|
||||
let connection = setup_users(":memory:");
|
||||
|
Reference in New Issue
Block a user