Class OcMethod

Synopsis

#include <include/internal/catch_objc.hpp>

class OcMethod : public ITestInvoker

Description

No description yet.

Inheritance

Ancestors: ITestInvoker

Methods

OcMethod
invoke

Source

Lines 38-57 in include/internal/catch_objc.hpp.

class OcMethod : public ITestInvoker {
public:
    OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}
    virtual void invoke() const {
        id obj = [[m_cls alloc] init];
        performOptionalSelector( obj, @selector(setUp)  );
        performOptionalSelector( obj, m_sel );
        performOptionalSelector( obj, @selector(tearDown)  );
        arcSafeRelease( obj );
    }
private:
    virtual ~OcMethod() {}
    Class m_cls;
    SEL m_sel;
};





Add Discussion as Guest

Log in