wip: updating tests
Some checks are pending
/ build (push) Waiting to run

This commit is contained in:
🪞👃🪞 2025-06-12 21:17:08 +03:00
parent 21832453d9
commit 17506726cb
36 changed files with 280 additions and 271 deletions

View file

@ -16,3 +16,4 @@ mod ops; pub use self::ops::*;
mod output; pub use self::output::*;
#[cfg(test)] mod test;
#[cfg(test)] pub use proptest_derive::Arbitrary;

View file

@ -1,5 +1,5 @@
use crate::*;
use proptest_derive::Arbitrary;
use crate::{*, Direction::*};
//use proptest_derive::Arbitrary;
use proptest::{prelude::*, option::of};
proptest! {
@ -86,7 +86,7 @@ macro_rules! test_op_transform {
if let Some(op) = match (op_x, op_y) {
(Some(x), Some(y)) => Some($Op::xy(x, y, content)),
(Some(x), None) => Some($Op::x(x, content)),
(Some(y), None) => Some($Op::y(y, content)),
(None, Some(y)) => Some($Op::y(y, content)),
_ => None
} {
assert_eq!(Content::layout(&op, [x, y, w, h]),
@ -142,7 +142,7 @@ proptest! {
fn area_mut (&mut self) -> &mut [u16;4] {
&mut self.0
}
fn place (&mut self, _: [u16;4], _: &impl Render<TestOutput>) {
fn place <T: Render<Self> + ?Sized> (&mut self, _: [u16;4], _: &T) {
()
}
}
@ -162,9 +162,9 @@ proptest! {
#[test] fn test_iter_map () {
struct Foo;
impl<T: Output> Content<T> for Foo {}
fn make_map <T: Output, U: Content<T> + Send + Sync> (data: &Vec<U>) -> impl Content<T> {
Map::new(||data.iter(), |foo, index|{})
fn _make_map <T: Output, U: Content<T> + Send + Sync> (data: &Vec<U>) -> impl Content<T> {
Map::new(||data.iter(), |_foo, _index|{})
}
let data = vec![Foo, Foo, Foo];
let _data = vec![Foo, Foo, Foo];
//let map = make_map(&data);
}