
#![allow(dead_code)]
#[cfg(test)]

mod memory_manager_tests {
    use crate::foundation::core::memory_manager::MemoryManager;
    use crate::foundation::math::vector3::Vector3;
//    use crate::foundation::math::chunk::Vector3;

    #[test]
    fn memory_pool_size_is_correct() {
        let memory_manager = MemoryManager::new(1000);
        assert_eq!(memory_manager.memory_pool_size(), 1000);
    }

    #[test]
    fn slice_from_memory_pool() {
        let mut memory_manager = MemoryManager::new(1000);
        let slice = memory_manager.slice_mut(500);
        assert_eq!(slice.len(), 500);
    }

    //#[test]
    //fn slice_and_write() {
        //let mut memory_manager = MemoryManager::new(1000);
        //let mut slice = memory_manager.slice_mut(500);
        //let slice2 = memory_manager.slice_mut(500);
////        memory_manager.set(500, 1);
        //slice[0] = 1;
        //assert_eq!(slice2[0], 1);
    //}

    //#[test]
    //fn slice_and_vector() {
        //let mut memory_manager = MemoryManager::new(1000);
        //let mut slice = memory_manager.slice_mut(500);
        //slice[0] = 1;
        //let mut vec3 = Vector3::new(slice);
        //assert_eq!(vec3.x(), 1);
        //*vec3.x_mut() = 2;
        //assert_eq!(vec3.x(), 2);
    //}
}
