I disagree, the right place is in the code where the functionality is defined. And the comment you replied to i didn't read as "assertions instead of tests". That's absurd. You should have tests that exercise the code that contains the assertions.
It's the best of both worlds. You get code automatically tested and you get inline documentation that can't lie to you.