Andrii Nakryiko <andrii.nakry...@gmail.com> writes:

>> Ah, thanks! I always get confused about CHECK() as well! Maybe it should
>> be renamed to ASSERT()? But that would require flipping all the if()
>> statements around them as well :/
>
> Exactly, it's the opposite of assert (ASSERT_NOT %-), that
> CHECK(!found) is "assert not not found", right?) and it throws me off
> every. single. time.

Yup, me too, I have to basically infer the right meaning from the
surrounding if statements (i.e., whether it triggers an error path or
not).

> Ideally we complete the set of ASSERT_XXX() macros and convert as much
> as possible to that. We can also have just generic ASSERT() for all
> other complicated cases.

Totally on board with that! I'll try to remember to fix any selftests I
fiddle with (and not introduce any new uses of CHECK() of course).

-Toke

Reply via email to