git-ext/test: Remove unused file

This commit is contained in:
Lorenz Leutgeb
2026-06-22 11:31:07 +01:00
committed by Fintan Halpenny
parent 7fa4c57352
commit 8efd733c20
2 changed files with 0 additions and 17 deletions
-1
View File
@@ -3,7 +3,6 @@
use proptest::strategy::Strategy;
pub mod commit;
pub mod urn;
pub fn alphanumeric() -> impl Strategy<Value = String> {
"[a-zA-Z0-9_]+"
-16
View File
@@ -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()),]
}