mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-16 10:42: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 <string>
|
||||
|
||||
#ifndef CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH
|
||||
#define CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH 512
|
||||
#endif
|
||||
|
||||
#ifndef CATCH_CONFIG_CONSOLE_WIDTH
|
||||
#define CATCH_CONFIG_CONSOLE_WIDTH 80
|
||||
#endif
|
||||
|
@ -262,7 +262,7 @@ namespace Catch {
|
||||
|
||||
template<char C>
|
||||
char const* getLineOfChars() {
|
||||
static char line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
|
||||
static char line[CATCH_CONFIG_CONSOLE_MAXIMUM_WIDTH] = {0};
|
||||
if( !*line ) {
|
||||
std::memset( line, C, CATCH_CONFIG_CONSOLE_WIDTH-1 );
|
||||
line[CATCH_CONFIG_CONSOLE_WIDTH-1] = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user