WIP: Create infrastructure for testing element layout

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-08-23 15:20:23 +02:00
co-authored by Nathan Sobo
parent 6129bda068
commit 6dddb72e82
3 changed files with 48 additions and 41 deletions
+11
View File
@@ -192,3 +192,14 @@ impl<'a> sum_tree::Dimension<'a, ElementHeightSummary> for Height {
self.0 += summary.height;
}
}
#[cfg(test)]
mod tests {
use super::*;
#[crate::test(self)]
fn test_layout(cx: &mut crate::MutableAppContext) {
let mut presenter = cx.build_presenter(0, 20.0);
let layout_cx = presenter.layout_cx(cx);
}
}