Sha256: d880a51db70656331983b6314315822d9d5a3f947ea42318015166a551341c5f

Contents?: true

Size: 632 Bytes

Versions: 2

Compression:

Stored size: 632 Bytes

Contents

#ifndef BANDIT_VISUAL_STUDIO_FAILURE_FORMATTER_H
#define BANDIT_VISUAL_STUDIO_FAILURE_FORMATTER_H

namespace bandit { namespace detail {

  struct visual_studio_failure_formatter : public failure_formatter
  {
    std::string format(const assertion_exception& err) const
    {
      std::stringstream ss;
      if(err.file_name().size())
      {
        ss << err.file_name();

        if(err.line_number())
        {
          ss << "(" << err.line_number() << ")";
        }

        ss << ": ";
      }
      else
      {
        ss << "bandit: ";
      }

      ss << err.what();

      return ss.str();

    }
  };

}}

#endif

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tree-sitter-0.1.0 ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/visual_studio_failure_formatter.h
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/bandit/bandit/failure_formatters/visual_studio_failure_formatter.h