1#![doc(html_root_url = "https://docs.rs/wgpu-app/0.17.4")]
2pub mod vt;
6pub mod app;
7
8#[cfg(test)]
9mod tests {
10 use super::*;
11
12 #[test]
13 fn test_vt() {
14 assert_eq!(vt::vtx([1, 1, 1], [1, 1]), vt::Vertex{
15 pos: [1.0f32; 4],
16 norm: [1.0f32; 4],
17 col: [191u32, 191u32, 191u32, 255u32],
18 tex_coord: [1.0f32; 2],
19 ix: 0});
20 assert_eq!(vt::vtf([1, 1, 1], [1.0, 1.0]), vt::Vertex{
21 pos: [1.0f32; 4],
22 norm: [1.0f32; 4],
23 col: [191u32, 191u32, 191u32, 255u32],
24 tex_coord: [1.0f32; 2],
25 ix: 0});
26 }
27
28 #[test]
29 fn test_app() {
30 assert_eq!(app::cast_slice(&[0i8; 4]), &[0u8; 4]);
31 assert_eq!(app::cast_slice(&[0u16; 4]), &[0u8; 8]);
32 }
35}