mirror of
https://codeberg.org/unspeaker/tengri.git
synced 2025-12-06 03:36:42 +01:00
This commit is contained in:
parent
21832453d9
commit
17506726cb
36 changed files with 280 additions and 271 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue