void assert_that_(const char *file, int line, const char *actual_string, const std::string& actual, Constraint* constraint) { // if they are using a string constraint, they are almost certainly meaning to do a deep comparison if (is_string_comparing(constraint)) { assert_that_(file, line, actual_string, (intptr_t) (actual.c_str()), constraint); return; } assert_that_(file, line, actual_string, (const std::string *) (&actual), constraint); }
bool is_comparing(const Constraint *constraint) { return is_string_comparing(constraint) || is_content_comparing(constraint) || is_double_comparing(constraint) || constraint->type == VALUE_COMPARER; }
bool values_are_strings_in(const Constraint *constraint) { return is_string_comparing(constraint) && (constraint->expected_value != (intptr_t)NULL); }