From b85fc6adc22f0dcc3a9093009fdba690a628a660 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 4 Feb 2021 10:17:55 +0100 Subject: [PATCH] Rename testcases to test_cases --- Cargo.toml | 4 ++-- src/lib.rs | 4 ++-- src/{testcases.rs => test_cases.rs} | 0 src/test_data.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename src/{testcases.rs => test_cases.rs} (100%) 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 {