mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: big flat
This commit is contained in:
parent
8cbe621b07
commit
4a3de618d0
20 changed files with 305 additions and 336 deletions
49
src/test.rs
49
src/test.rs
|
|
@ -1,3 +1,52 @@
|
|||
//#[cfg(test)] mod test_focus {
|
||||
//use super::focus::*;
|
||||
//#[test] fn test_focus () {
|
||||
|
||||
//struct FocusTest {
|
||||
//focused: char,
|
||||
//cursor: (usize, usize)
|
||||
//}
|
||||
|
||||
//impl HasFocus for FocusTest {
|
||||
//type Item = char;
|
||||
//fn focused (&self) -> Self::Item {
|
||||
//self.focused
|
||||
//}
|
||||
//fn set_focused (&mut self, to: Self::Item) {
|
||||
//self.focused = to
|
||||
//}
|
||||
//}
|
||||
|
||||
//impl FocusGrid for FocusTest {
|
||||
//fn focus_cursor (&self) -> (usize, usize) {
|
||||
//self.cursor
|
||||
//}
|
||||
//fn focus_cursor_mut (&mut self) -> &mut (usize, usize) {
|
||||
//&mut self.cursor
|
||||
//}
|
||||
//fn focus_layout (&self) -> &[&[Self::Item]] {
|
||||
//&[
|
||||
//&['a', 'a', 'a', 'b', 'b', 'd'],
|
||||
//&['a', 'a', 'a', 'b', 'b', 'd'],
|
||||
//&['a', 'a', 'a', 'c', 'c', 'd'],
|
||||
//&['a', 'a', 'a', 'c', 'c', 'd'],
|
||||
//&['e', 'e', 'e', 'e', 'e', 'e'],
|
||||
//]
|
||||
//}
|
||||
//}
|
||||
|
||||
//let mut tester = FocusTest { focused: 'a', cursor: (0, 0) };
|
||||
|
||||
//tester.focus_right();
|
||||
//assert_eq!(tester.cursor.0, 3);
|
||||
//assert_eq!(tester.focused, 'b');
|
||||
|
||||
//tester.focus_down();
|
||||
//assert_eq!(tester.cursor.1, 2);
|
||||
//assert_eq!(tester.focused, 'c');
|
||||
|
||||
//}
|
||||
//}
|
||||
//use crate::*;
|
||||
|
||||
//struct TestEngine([u16;4], Vec<Vec<char>>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue