mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
move test crate into core
This commit is contained in:
parent
02db343574
commit
0a842b607a
12 changed files with 523 additions and 507 deletions
|
|
@ -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
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue