SenTestCase_Macros


Declared In:
SenTestCase_Macros.h



Macro Definitions

Synopsis:

STAssertEqualObjects(a1, a2, description, ...)

Description:

Generates a failure when [a1 isEqualTo:a2] is false (or one is nil and the other is not).
a1The object on the left.
a2The object on the right.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertEquals(a1, a2, description, ...)
STAbsoluteDifference(left,right)

Description:

Generates a failure when a1 is not equal to a2. This test is for C scalars, structs and unions.
a1The argument on the left.
a2The argument on the right.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertEqualsWithAccuracy(a1, a2, accuracy, description, ...)

Description:

Generates a failure when a1 is not equal to a2 within + or - accuracy is false. This test is for scalars such as floats and doubles where small differences could make these items not exactly equal, but also works for all scalars.
a1The scalar on the left.
a2The scalar on the right.
accuracyThe maximum difference between a1 and a2 for these values to be considered equal.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STFail(description, ...)

Description:

Generates a failure unconditionally.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertNotNil(a1, description, ...)

Description:

Generates a failure when a1 is nil.
a1An object.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertTrue(expr, description, ...)

Description:

Generates a failure when expression evaluates to false.
exprThe expression that is tested.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertTrueNoThrow(expr, description, ...)

Description:

Generates a failure when expression evaluates to false and in addition will generate error messages if an exception is encountered.
exprThe expression that is tested.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertFalse(expr, description, ...)

Description:

Generates a failure when the expression evaluates to true.
exprThe expression that is tested.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertFalseNoThrow(expr, description, ...)

Description:

Generates a failure when the expression evaluates to true and in addition will generate error messages if an exception is encountered.
exprThe expression that is tested.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertThrows(expr, description, ...)

Description:

Generates a failure when expression does not throw an exception.
expressionThe expression that is evaluated.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertThrowsSpecific(expr, specificException, description, ...)

Description:

Generates a failure when expression does not throw an exception of a specific class.
expressionThe expression that is evaluated.
specificExceptionThe specified class of the exception.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertThrowsSpecificNamed(expr, specificException, aName, description, ...)

Description:

Generates a failure when expression does not throw an exception of a specific class with a specific name. Useful for those frameworks like AppKit or Foundation that throw generic NSException w/specific names (NSInvalidArgumentException, etc).
expressionThe expression that is evaluated.
specificExceptionThe specified class of the exception.
aNameThe name of the specified exception.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertNoThrow(expr, description, ...)

Description:

Generates a failure when expression does throw an exception.
expressionThe expression that is evaluated.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertNoThrowSpecific(expr, specificException, description, ...)

Description:

Generates a failure when expression does throw an exception of the specitied class. Any other exception is okay (i.e. does not generate a failure).
expressionThe expression that is evaluated.
specificExceptionThe specified class of the exception.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

STAssertNoThrowSpecificNamed(expr, specificException, aName, description, ...)

Description:

Generates a failure when expression does throw an exception of a specific class with a specific name. Useful for those frameworks like AppKit or Foundation that throw generic NSException w/specific names (NSInvalidArgumentException, etc).
expressionThe expression that is evaluated.
specificExceptionThe specified class of the exception.
aNameThe name of the specified exception.
descriptionA format string as in the printf() function. Can be nil or an empty string but must be present.
...A variable number of arguments to the format string. Can be absent.

Synopsis:

fail()

Description:

This macro has been deprecated as of Feb 2004. Generates a failure unconditionally.

Synopsis:

fail1(description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure unconditionally.

Synopsis:

should(expression)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression evaluates to false.

Synopsis:

should1(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression evaluates to false.

Synopsis:

shouldnt(expression)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when a expression evaluates to true.

Synopsis:

shouldnt1(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when a expression evaluates to true.

Synopsis:

shouldBeEqual(left, right)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when [left isEqualTo:right] is false (or left is nil and right is not).

Synopsis:

shouldBeEqual1(left, right, description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when [left isEqualTo:right] is false (or left is nil and right is not).

Synopsis:

shouldRaise(expression)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression does not raise an exception.

Synopsis:

shouldRaise1(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression does not raise an exception.

Synopsis:

shouldntRaise(expression)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression does raise an exception.

Synopsis:

shouldntRaise1(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Generates a failure when expression does raise an exception.

Synopsis:

shouldnoraise(expression)

Description:

This macro has been deprecated as of Feb 2004. Wrapper for should() that will generate error messages if an exception is raised. Uses new-style exception.

Synopsis:

should1noraise(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Wrapper for should() that will generate error messages if an exception is raised. Uses new-style exception.

Synopsis:

shouldntnoraise(expression)

Description:

This macro has been deprecated as of Feb 2004. Wrapper for shouldnt() that will generate error messages if an exception is raised. Uses new-style exceptions

Synopsis:

shouldnt1noraise(expression, description)

Description:

This macro has been deprecated as of Feb 2004. Wrapper for shouldnt() that will generate error messages if an exception is raised. Uses new-style exceptions


CVS Version 1.25 Copyright ©2005 by Sente SA. All Rights Reserved. Fri Apr 01 13:49:06 2005