test: add tests for signal operation sugar
TODO: Some tests overflow, so we need to fix that.
This commit is contained in:
parent
5b88a1dac6
commit
a6dc175c8a
3 changed files with 88 additions and 17 deletions
|
|
@ -1,16 +1,12 @@
|
|||
use std::{cmp::Ordering, time::Duration};
|
||||
use std::cmp::Ordering;
|
||||
use std::time::Duration;
|
||||
|
||||
use num_traits::NumCast;
|
||||
|
||||
use crate::signals::{
|
||||
utils::{find_intersection, Neighborhood},
|
||||
InterpolationMethod, Sample,
|
||||
};
|
||||
|
||||
use super::{
|
||||
traits::{BaseSignal, LinearInterpolatable, SignalPartialOrd, SignalSyncPoints},
|
||||
ConstantSignal, Signal,
|
||||
};
|
||||
use super::traits::{BaseSignal, LinearInterpolatable, SignalPartialOrd, SignalSyncPoints};
|
||||
use super::{ConstantSignal, Signal};
|
||||
use crate::signals::utils::{find_intersection, Neighborhood};
|
||||
use crate::signals::{InterpolationMethod, Sample};
|
||||
|
||||
fn sync_with_intersection<'a, T, Sig1, Sig2, F>(
|
||||
sig1: &'a Sig1,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
use num_traits::{Num, NumCast, Signed};
|
||||
|
||||
use super::traits::LinearInterpolatable;
|
||||
use crate::signals::utils::{apply1, apply2, apply2_const};
|
||||
use crate::signals::{ConstantSignal, Signal};
|
||||
|
||||
use super::traits::LinearInterpolatable;
|
||||
|
||||
impl<T> core::ops::Neg for &Signal<T>
|
||||
where
|
||||
T: Signed + Copy,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue