move test crate into core

This commit is contained in:
🪞👃🪞 2024-09-12 22:31:51 +03:00
parent 02db343574
commit 0a842b607a
12 changed files with 523 additions and 507 deletions

View file

@ -25,11 +25,16 @@ use std::fmt::{Debug, Display};
($($name:ident)*) => { $(mod $name; pub use self::$name::*;)* };
}
/// Define and reexport public modules.
/// Define public modules.
#[macro_export] macro_rules! pubmod {
($($name:ident)*) => { $(pub mod $name;)* };
}
/// Define test modules.
#[macro_export] macro_rules! testmod {
($($name:ident)*) => { $(#[cfg(test)] mod $name;)* };
}
submod! {
audio
edn
@ -39,6 +44,10 @@ submod! {
tui
}
testmod! {
test
}
/// Standard result type.
pub type Usually<T> = Result<T, Box<dyn Error>>;
@ -52,7 +61,7 @@ pub trait Number: Send + Sync + Copy
+ Mul<Self, Output=Self>
+ Div<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display {}
+ Debug + Display + Default {}
impl<T> Number for T where
T: Send + Sync + Copy
@ -61,5 +70,5 @@ impl<T> Number for T where
+ Mul<Self, Output=Self>
+ Div<Self, Output=Self>
+ Ord + PartialEq + Eq
+ Debug + Display
+ Debug + Display + Default
{}