diff --git a/Cargo.toml b/Cargo.toml index 812b910..37c294b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,8 +10,8 @@ repository = "https://github.com/InstantDomainSearch/instant-segment" documentation = "https://docs.rs/instant-segment" [features] -__test_data = ["testcases"] -testcases = [] +__test_data = ["test-cases"] +test-cases = [] [dependencies] ahash = "0.7.0" diff --git a/src/lib.rs b/src/lib.rs index 68e40e2..43161a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,10 +3,10 @@ use std::str; use smartstring::alias::String; +#[cfg(feature = "test-cases")] +pub mod test_cases; #[cfg(feature = "__test_data")] pub mod test_data; -#[cfg(feature = "testcases")] -pub mod testcases; /// Central data structure used to calculate word probabilities pub struct Segmenter { diff --git a/src/testcases.rs b/src/test_cases.rs similarity index 100% rename from src/testcases.rs rename to src/test_cases.rs diff --git a/src/test_data.rs b/src/test_data.rs index 5a4f8a7..63a4954 100644 --- a/src/test_data.rs +++ b/src/test_data.rs @@ -9,7 +9,7 @@ use super::Segmenter; #[test] fn test_data() { - crate::testcases::run(segmenter()); + crate::test_cases::run(segmenter()); } pub fn segmenter() -> Segmenter {