Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC
ADC Home > Reference Library > Reference > Tools > Xcode > CPlusTest Reference

 


TestInvocation

Declared In:

Overview

Abstract base class describing an invocation of a test.

Discussion

TestInvocation is an abstract base class describing the invocation of a test. This base class makes it possible to specify invocations as arguments and instance variables without requiring the spread of template declarations. Generally you will use the macro TEST_INVOCATION to create a TestInvocation, passing it a Test subclass and an instance method. In order to actually invoke a test method, CPlusTest sends the TestInvocation representing it invokeWithTarget and passes that a pointer to the individual Test to invoke the method on.



Functions

invokeWithTarget
Invokes the method this invocation represents on the passed Test.
name
Gets the name of the TestInvocation.
TestInvocation
Constructor for the TestInvocation class.
~TestInvocation
Destructor for the TestInvocation class.

invokeWithTarget


Invokes the method this invocation represents on the passed Test.

public

virtual void invokeWithTarget( Test *target) = 0;
Parameters
target
The Test the method this invocation represents should be invoked on.
Discussion

Invokes the method this invocation represents on the passed Test. This may throw an exception.


name


Gets the name of the TestInvocation.

public

virtual const std::string& name() = 0;
Return Value

Returns the name of the TestInvocation.

Discussion

Gets the name of the TestInvocation. Generally this should be in the form "ClassName::methodName" however this is not required.


TestInvocation


Constructor for the TestInvocation class.

public

TestInvocation();
Discussion

Constructor for the TestInvocation class.


~TestInvocation


Destructor for the TestInvocation class.

public

virtual ~TestInvocation();
Discussion

Destructor for the TestInvocation class.




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-03-11