Skip to content

CHECK at TEST_CASE level ignores logging? #1759

@sd-x

Description

@sd-x

Given this program:

#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"

int x = 0;

TEST_CASE("my case", "[foo]") {
  auto y = 1-x;
  CAPTURE(y);
  SECTION("my section") {
    // CHECK(false);  // If uncomment this, I see the CAPTURE message for it
  }
  CHECK(false); // I expect the message for this line to show 'y := 1', but it's missing
}

I do not see the

with message:
  y := 1

in the output (when run default options). INFO behaves similarly.

my g++ is 7.3.0 and my Catch2 is v2.9.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions