mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
types: add mocks for RepoPathBuf
Summary: This will be used in transitioning key from bytes to repo path. Reviewed By: quark-zju Differential Revision: D14877548 fbshipit-source-id: f79863469d58b53557e51ebb033cc6a6b5f43499
This commit is contained in:
parent
cca46940f6
commit
bec1a1d3e0
@ -515,6 +515,21 @@ impl quickcheck::Arbitrary for PathComponentBuf {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "for-tests"))]
|
||||
pub mod mocks {
|
||||
use super::*;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref FOO_PATH: RepoPathBuf =
|
||||
RepoPathBuf::from_string(String::from("foo")).unwrap();
|
||||
pub static ref BAR_PATH: RepoPathBuf =
|
||||
RepoPathBuf::from_string(String::from("bar")).unwrap();
|
||||
pub static ref BAZ_PATH: RepoPathBuf =
|
||||
RepoPathBuf::from_string(String::from("baz")).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
Loading…
Reference in New Issue
Block a user