test "Position id bigger than count of all positions" {
mut tree := &OctreeNode{
center: tellusim.TSVector3f{x: 0, y: 0, z: 0},
size: 1,
}
positions := []tellusim.TSVector3f{}
error := insert(tree, positions, 0, 1)
t.assert_eq(error.unwrap_err().msg(), POSITION_ID_TOO_BIG_ERROR, "Must be error")
}
Consider this test
if
erroris not error, codeerror.unwrap_err().msg()will panic, and when running the test all tests will fail silently and output will not appear in the console