Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

How to Stop/Fail a Benchmark if fixture SetUp() fails? #46

@roniemartinez

Description

@roniemartinez

Hi,

It seems there's not a way to stop/fail a benchmark whenever it is not possible to continue during SetUp().

class TestFixture : public ::hayai::Fixture
{
 public:
    virtual void SetUp() {
        test = new Test();
        if (!test->canContinue()) {
            // SHOULD STOP HERE!
        }
    }
    virtual void TearDown() {
        delete(test);
    }
    Test *test;
};

BENCHMARK_F()'s connected to the fixture above still continues to execute.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions