Skip to content

[BUG] The EXPECTFAIL negative test does not fail #122

@josephgarnier

Description

@josephgarnier

Describe the bug
According to the documentation, we can test that an exception has indeed been raised by using the EXPECTFAIL keyword.

So I assumed that the inverse is also true.

However, the code below passes, when it should fail:

ct_add_test(NAME "test_throw_exception")
function(${CMAKETEST_TEST})

	ct_add_section(NAME "should_fail" EXPECTFAIL)
	function(${CMAKETEST_SECTION})
		message(STATUS "test_throw_exception/should_fail")
	endfunction()
endfunction()

Is this the expected behavior or is it a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions