Sha256: 6a6e9b52ef13b13fe854a9855773f3e44f4d1a27606bcbeb472e9275bab2c532

Contents?: true

Size: 586 Bytes

Versions: 2

Compression:

Stored size: 586 Bytes

Contents

#include <specs/specs.h>
namespace bd = bandit::detail;

go_bandit([](){

  describe("default failure formatter", [&](){
    bd::default_failure_formatter formatter;
  
    it("formats assertions with file and line number", [&](){
      bd::assertion_exception exception("message", "file", 321);
      AssertThat(formatter.format(exception), Equals("file:321: message"));
    });

    it("formats assertions without file and line number", [&](){
      bd::assertion_exception exception("message");
      AssertThat(formatter.format(exception), Equals("message"));
    });
  
  });

});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/default_formatter.spec.cpp
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/bandit/specs/failure_formatters/default_formatter.spec.cpp