Function convert

Synopsis

#include <include/internal/catch_tostring.h>

static std::string convert(signed char c)

Description

No description yet.

Source

Lines 213-229 in include/internal/catch_tostring.cpp. Line 255 in include/internal/catch_tostring.h.

std::string StringMaker<signed char>::convert(signed char value) {
    if (value == '\r') {
        return "'\\r'";
    } else if (value == '\f') {
        return "'\\f'";
    } else if (value == '\n') {
        return "'\\n'";
    } else if (value == '\t') {
        return "'\\t'";
    } else if ('\0' <= value && value < ' ') {
        return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
    } else {
        char chstr[] = "' '";
        chstr[1] = value;
        return chstr;
    }
}





Add Discussion as Guest

Log in