catchorg / catchorg/Catch2

Testing logger functions

Open
#2,198 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

I am building a logger library. I am facing two issues here:
1. the log functions by default print a log string in the terminal. so the function prototype for log is something like this
`void log_trace(int, char*, char*, char*);` This function, internally concatenates the inputs and constructs a string and prints it on the screen. How do I use REQUIRE or REQUIRE_THAT to compare this ourput with a expected output string? (THe string that is displayed on the screen is not constructed as whole string.)
2. The log string generated includes internally generated strings concatenated with user supplied string.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.