Skip to content

Tests silently fail when there is a panic occur #28

Description

@ArtemkaKun

Consider this test

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")
}

if error is not error, code error.unwrap_err().msg() will panic, and when running the test all tests will fail silently and output will not appear in the console

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions