Sha256: 3ae60723c0745dbfd851389487fe98ce9796a0baad215b965f91e1fd88a3d11d

Contents?: true

Size: 1.75 KB

Versions: 2

Compression:

Stored size: 1.75 KB

Contents

#ifndef BANDIT_SPECS_FAKE_REPORTER_H
#define BANDIT_SPECS_FAKE_REPORTER_H

namespace bandit { namespace fakes {
  struct fake_reporter : 
    public bandit::detail::listener, 
    public bandit::specs::logging_fake
  {
    fake_reporter() : test_run_status_(true)
    {}

    void test_run_starting()
    {
      log() << "test_run_starting" << std::endl;
    }

    void test_run_complete()
    {
      log() << "test_run_complete" << std::endl;
    }

    void context_starting(const char* desc)
    {
      log() << "context_starting: " <<  desc << std::endl;
    }

    void context_ended(const char* desc)
    {
      log() << "context_ended: " <<  desc << std::endl;
    }

    void test_run_error(const char* desc, const struct bandit::detail::test_run_error& err)
    {
      log() << "test_run_error: " <<  desc <<  " (" <<  strip_newline(err.what()) <<  ")" << std::endl;
    }

    void it_starting(const char* desc)
    {
      log() << "it_starting: " <<  desc << std::endl;
    }

    void it_succeeded(const char* desc)
    {
      log() << "it_succeeded: " <<  desc << std::endl;
    }

    void it_failed(const char* desc, const bandit::detail::assertion_exception& ex)
    {
      log() << "it_failed: " <<  desc <<  " ("  <<  strip_newline(ex.what()) <<  ")" << std::endl;
    }

    void it_unknown_error(const char* desc)
    {
      log() << "it_unknown_error: " <<  desc << std::endl;
    }

    void it_skip(const char* desc)
    {
      log() << "it_skip: " <<  desc << std::endl;
    }

    bool did_we_pass() const
    {
      return test_run_status_;
    }

    void set_test_run_status(bool status)
    {
      test_run_status_ = status;
    }

    private:
    bool test_run_status_;
  };
  typedef std::unique_ptr<fake_reporter> fake_reporter_ptr;
}}

#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/specs/fakes/fake_reporter.h
tree-sitter-0.0.1 ext/tree-sitter/tree-sitter/externals/bandit/specs/fakes/fake_reporter.h