Skip to content

test.cpp needs to return non-0 if tests fail #6

@bast

Description

@bast

Right now the code looks like it always returns 0 but this is surprising for any test framework that would want to run the executable. I tried with CTest but basically any other would behave the same way.

The expectation is that the binary returns 0 if all tests succeed and non-0 if there are failures. The return code can for instance be defined as number of failing tests.

If it always returns 0, then test frameworks will report that it passed because they only look at return code.

Metadata

Metadata

Assignees

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