Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void print_some_info(int severity, const char* message, va_list argp)
- {
- UNSCOPED_INFO(message);
- std::string value;
- value.resize(20);
- REQUIRE(value.size() == 20);
- UNSCOPED_INFO("testing size of formated string");
- size_t size = vsnprintf(const_cast<char*>(value.c_str()), 0, message, argp);
- value.resize(size + 1);
- REQUIRE(value.size() == size + 1);
- UNSCOPED_INFO("create copy of formate string");
- UNSCOPED_INFO("size of string is" << value.size());
- size = vsnprintf(const_cast<char*>(value.c_str()), value.size(), message, argp);
- UNSCOPED_INFO("size of string is" << size);
- REQUIRE(value.size() == size + 1);
- //UNSCOPED_INFO("set null terminator");
- //value.c_str()[size] = 0;
- UNSCOPED_INFO(value.c_str());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement