mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 18:52:25 +01:00
Specify a maximum console width that is independent of CATCH_CONFIG_CONSOLE_WIDTH
This commit is contained in:
parent
d4b0b34561
commit
a9bbc42e9c
@ -18,6 +18,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifndef CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH
|
||||||
|
#define CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH 512
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
|
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
|
||||||
#define CATCH_CONFIG_CONSOLE_WIDTH 80
|
#define CATCH_CONFIG_CONSOLE_WIDTH 80
|
||||||
#endif
|
#endif
|
||||||
|
@ -262,7 +262,7 @@ namespace Catch {
|
|||||||
|
|
||||||
template<char C>
|
template<char C>
|
||||||
char const* getLineOfChars() {
|
char const* getLineOfChars() {
|
||||||
static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
|
static char line[CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH] = {0};
|
||||||
if( !*line ) {
|
if( !*line ) {
|
||||||
std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );
|
std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );
|
||||||
line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;
|
line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user