Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Add semicolon after INFO #1482

Merged
merged 2 commits into from Jan 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/logging.md
Expand Up @@ -45,6 +45,9 @@ These macros come in three forms:

The message is logged to a buffer, but only reported with the next assertion that is logged. This allows you to log contextual information in case of failures which is not shown during a successful test run (for the console reporter, without -s). Messages are removed from the buffer at the end of their scope, so may be used, for example, in loops.

_Note that in Catch2 2.x.x `INFO` can be used without a trailing semicolon as there is a trailing semicolon inside macro.
This semicolon will be removed with next major version. It is highly advised to use a trailing semicolon after `INFO` macro._

**WARN(** _message expression_ **)**

The message is always reported but does not fail the test.
Expand Down
6 changes: 3 additions & 3 deletions examples/210-Evt-EventListeners.cpp
Expand Up @@ -387,16 +387,16 @@ TEST_CASE( "2: Testcase with sections", "[tag-A][tag-B]" ) {
REQUIRE( i == 42 );

SECTION("Section 1") {
INFO("Section 1")
INFO("Section 1");
i = 7;
SECTION("Section 1.1") {
INFO("Section 1.1")
INFO("Section 1.1");
REQUIRE( i == 42 );
}
}

SECTION("Section 2") {
INFO("Section 2")
INFO("Section 2");
REQUIRE( i == 42 );
}
WARN("At end of test case");
Expand Down