The doctest C++ test framework has a DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING
configuration option. This option allows me to write
char * tls_password;
// ...
CHECK(tsl_password == "swordfish");
That is, use ==
to compare C strings without having to use the more verbose C-style
CHECK(strcmp(tsl_password, "swordfish") == 0);
How can I achieve the effect of DOCTEST_CONFIG_TREAT_CHAR_STAR_AS_STRING
in Catch2? That is, have boilerplate-free assertions that compare to C-style string constants.