wip-working
This commit is contained in:
87
test/musicplayer/ui/layout_test.gleam
Normal file
87
test/musicplayer/ui/layout_test.gleam
Normal file
@@ -0,0 +1,87 @@
|
||||
// import gleam/dict
|
||||
// import gleam/int
|
||||
// import gleeunit
|
||||
|
||||
// import musicplayer/ui/layout.{type Node, Layout, Section}
|
||||
|
||||
// pub fn main() -> Nil {
|
||||
// gleeunit.main()
|
||||
// }
|
||||
|
||||
// pub fn foo_test() {
|
||||
// let expected = ""
|
||||
|
||||
// let layout =
|
||||
// Layout(
|
||||
// width: 80,
|
||||
// height: 20,
|
||||
// nodes:,
|
||||
// dict.from_list([
|
||||
// #(
|
||||
// Section("Root"),
|
||||
// Node(
|
||||
// t: Container,
|
||||
// content: "container",
|
||||
// width_percent: 100,
|
||||
// height_percent: 100,
|
||||
// children: [
|
||||
// Section("Row1"),
|
||||
// Section("Row2"),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// #(
|
||||
// Section("Row1"),
|
||||
// Node(
|
||||
// t: Row,
|
||||
// content: "row 1",
|
||||
// width_percent: 100,
|
||||
// height_percent: 50,
|
||||
// children: [
|
||||
// Section("A"),
|
||||
// Section("B"),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// #(
|
||||
// Section("A"),
|
||||
// Node(
|
||||
// t: Cell,
|
||||
// content: "cell 1",
|
||||
// width_percent: 50,
|
||||
// height_percent: 100,
|
||||
// children: [],
|
||||
// ),
|
||||
// ),
|
||||
// #(
|
||||
// B,
|
||||
// Node(
|
||||
// t: Cell,
|
||||
// content: "cell 2",
|
||||
// width_percent: 50,
|
||||
// height_percent: 100,
|
||||
// children: [],
|
||||
// ),
|
||||
// ),
|
||||
// #(
|
||||
// Section("Row2"),
|
||||
// Node(
|
||||
// t: Row,
|
||||
// content: "row 1",
|
||||
// width_percent: 100,
|
||||
// height_percent: 50,
|
||||
// children: [],
|
||||
// ),
|
||||
// ),
|
||||
// ]),
|
||||
// )
|
||||
|
||||
// let container_width = int.to_float(layout.width)
|
||||
// let container_height = int.to_float(layout.height)
|
||||
// let container_top_left_x = 1
|
||||
// let container_top_left_y = 1
|
||||
|
||||
// let assert Ok(data) =
|
||||
// layout.render_loop(layout, container_width, container_height)
|
||||
// assert data == 123.456789
|
||||
// }
|
||||
Reference in New Issue
Block a user