"Dan Hipschman" dsh@linux.ucla.edu wrote:
But I like the assert. You haven't really given me a reason to take it out. Why is it inappropriate? It's use here seems perfectly reasonable to me. I'm calling NtQuerySecurityObject in such a way that I'm expecting it to fail, and if it doesn't fail it's certainly a bug. Further, it had better fail because there's nothing reasonable to do if it doesn't. assert is the perfect way to document all these things.
Any API may fail in some way, but that would be ridiculous to pollute the whole Wine source tree with asserts. As I've said, IMO it's better to have a test case for the API which will detect broken behaviour instead.