示例#1
0
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);
}
示例#2
0
bool is_comparing(const Constraint *constraint) {
    return is_string_comparing(constraint) ||
            is_content_comparing(constraint) ||
            is_double_comparing(constraint) ||
            constraint->type == VALUE_COMPARER;
}
示例#3
0
bool values_are_strings_in(const Constraint *constraint) {
    return is_string_comparing(constraint) && (constraint->expected_value != (intptr_t)NULL);
}