mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-25 17:50:23 +00:00
test: added an explicit cast for bstr test where sqlite failed to do an implicit cast
This commit is contained in:
parent
4ee1727ba6
commit
4f261b7346
@ -112,10 +112,9 @@ mod bstr {
|
||||
use super::*;
|
||||
use sqlx::types::bstr::BString;
|
||||
|
||||
test_type!(BString(Sqlite, "'abc123'" == BString::from(b"abc123")));
|
||||
test_type!(BString(
|
||||
Sqlite,
|
||||
"x'0001020304'" == BString::from(b"\x00\x01\x02\x03\x04")
|
||||
test_type!(bstring<BString>(Sqlite,
|
||||
"cast('abc123' as blob)" == BString::from(&b"abc123"[..]),
|
||||
"x'0001020304'" == BString::from(&b"\x00\x01\x02\x03\x04"[..])
|
||||
));
|
||||
}
|
||||
|
||||
@ -124,14 +123,11 @@ mod git2 {
|
||||
use super::*;
|
||||
use sqlx::types::git2::Oid;
|
||||
|
||||
test_type!(Oid(
|
||||
Sqlite,
|
||||
"x'0000000000000000000000000000000000000000'" == Oid::zero()
|
||||
));
|
||||
test_type!(Oid(
|
||||
test_type!(oid<Oid>(
|
||||
Sqlite,
|
||||
"x'0000000000000000000000000000000000000000'" == Oid::zero(),
|
||||
"x'000102030405060708090a0b0c0d0e0f10111213'"
|
||||
== Oid::from_str("000102030405060708090a0b0c0d0e0f10111213")
|
||||
== Oid::from_str("000102030405060708090a0b0c0d0e0f10111213").unwrap()
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user