mirror of
https://seed.radicle.dev/rad:z6cFWeWpnZNHh9rUW8phgA3b5yGt.git
synced 2026-10-18 19:10:31 +08:00
git-ext/test: Remove unused file
This commit is contained in:
committed by
Fintan Halpenny
parent
7fa4c57352
commit
8efd733c20
@@ -3,7 +3,6 @@
|
|||||||
use proptest::strategy::Strategy;
|
use proptest::strategy::Strategy;
|
||||||
|
|
||||||
pub mod commit;
|
pub mod commit;
|
||||||
pub mod urn;
|
|
||||||
|
|
||||||
pub fn alphanumeric() -> impl Strategy<Value = String> {
|
pub fn alphanumeric() -> impl Strategy<Value = String> {
|
||||||
"[a-zA-Z0-9_]+"
|
"[a-zA-Z0-9_]+"
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
use proptest::prelude::*;
|
|
||||||
use radicle_git_ext::Oid;
|
|
||||||
|
|
||||||
/// A proptest strategy that generates [`radicle_git_ext::oid::Oid`] values
|
|
||||||
/// of the type indicated in parameter `kind`
|
|
||||||
pub fn gen_oid(kind: git2::ObjectType) -> impl Strategy<Value = Oid> {
|
|
||||||
any::<Vec<u8>>()
|
|
||||||
.prop_map(move |bytes| git2::Oid::hash_object(kind, &bytes).map(Oid::from).unwrap())
|
|
||||||
}
|
|
||||||
|
|
||||||
/// A proptest strategy that generates [`radicle_git_ext::oid::Oid`] values
|
|
||||||
/// of the type indicated in parameter `kind` or a zeroed `Oid` with
|
|
||||||
/// equal probability
|
|
||||||
pub fn gen_oid_with_zero(kind: git2::ObjectType) -> impl Strategy<Value = Oid> {
|
|
||||||
prop_oneof![gen_oid(kind), Just(git2::Oid::ZERO_SHA1.into()),]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user