Skip to content

Getting some spurious output from the tests #15

@glennj

Description

@glennj

In the leap exercise I purposely created a slightly invalid solution

return year % 4 == 0 && (year % 100 != 0 || year % 400 == 1)

Appropriately, two tests failed.

However, the message for the first test is

expected is_leap_year(2000) to be true

To run only the failed tests, use:
	-define:ODIN_TEST_NAMES=leap.test_year_divisible_by_400_but_not_by_125_is_still_a_leap_year,leap.test_year_divisible_by_400_is_leap_year,

If your terminal supports OSC 52, you may use -define:ODIN_TEST_CLIPBOARD to have this copied directly to your clipboard.

The message for the 2nd failed test is expected

expected is_leap_year(2400) to be true

Fiter out the "To run only the failed tests ..." stuff.

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