Skip to content

Commit

Permalink
Add tests for git2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Nov 21, 2020
1 parent 71a72e7 commit 603c195
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/sqlite/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,19 @@ mod bstr {
"x'0001020304'" == BString::from(b"\x00\x01\x02\x03\x04")
));
}

#[cfg(feature = "git2")]
mod git2 {
use super::*;
use sqlx::types::git2::Oid;

test_type!(Oid(
Sqlite,
"x'0000000000000000000000000000000000000000'" == Oid::zero()
));
test_type!(Oid(
Sqlite,
"x'000102030405060708090a0b0c0d0e0f10111213'"
== Oid::from_str("000102030405060708090a0b0c0d0e0f10111213")
));
}

0 comments on commit 603c195

Please sign in to comment.