- Declared In:
- SenTestCase_Macros.h
Synopsis:
STAssertEqualObjects(a1, a2, description, ...)
Description:
Generates a failure when[a1 isEqualTo:a2]
is false (or one is nil and the other is not).
a1 The object on the left. a2 The object on the right. description A 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.
a1 The argument on the left. a2 The argument on the right. description A 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.
a1 The scalar on the left. a2 The scalar on the right. accuracy The maximum difference between a1 and a2 for these values to be considered equal. description A 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.
description A 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.
a1 An object. description A 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.
expr The expression that is tested. description A 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.
expr The expression that is tested. description A 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.
expr The expression that is tested. description A 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.
expr The expression that is tested. description A 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.
expression The expression that is evaluated. description A 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.
expression The expression that is evaluated. specificException The specified class of the exception. description A 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).
expression The expression that is evaluated. specificException The specified class of the exception. aName The name of the specified exception. description A 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.
expression The expression that is evaluated. description A 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).
expression The expression that is evaluated. specificException The specified class of the exception. description A 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).
expression The expression that is evaluated. specificException The specified class of the exception. aName The name of the specified exception. description A 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