OCHamcrest
Defines
Primitive Number Matchers
Number Matchers

Matchers for testing equality against primitive numeric types.
More...

Defines

#define equalToBool   HC_equalToBool
 equalToBool(value) - Matches if object is equal to NSNumber created from a BOOL.
#define equalToChar   HC_equalToChar
 equalToChar(value) - Matches if object is equal to NSNumber created from a char.
#define equalToDouble   HC_equalToDouble
 equalToDouble(value) - Matches if object is equal to NSNumber created from a double.
#define equalToFloat   HC_equalToFloat
 equalToFloat(value) - Matches if object is equal to NSNumber created from a float.
#define equalToInt   HC_equalToInt
 equalToInt(value) - Matches if object is equal to NSNumber created from an int.
#define equalToLong   HC_equalToLong
 equalToLong(value) - Matches if object is equal to NSNumber created from a long.
#define equalToLongLong   HC_equalToLongLong
 equalToLongLong(value) - Matches if object is equal to NSNumber created from a long long.
#define equalToShort   HC_equalToShort
 equalToShort(value) - Matches if object is equal to NSNumber created from a short.
#define equalToUnsignedChar   HC_equalToUnsignedChar
 equalToUnsignedChar(value) - Matches if object is equal to NSNumber created from an unsigned char.
#define equalToUnsignedInt   HC_equalToUnsignedInt
 equalToUnsignedInt(value) - Matches if object is equal to NSNumber created from an unsigned int.
#define equalToUnsignedLong   HC_equalToUnsignedLong
 equalToUnsignedLong(value) - Matches if object is equal to NSNumber created from an unsigned long.
#define equalToUnsignedLongLong   HC_equalToUnsignedLongLong
 equalToUnsignedLongLong(value) - Matches if object is equal to NSNumber created from an unsigned long long.
#define equalToUnsignedShort   HC_equalToUnsignedShort
 equalToUnsignedShort(value) - Matches if object is equal to NSNumber created from an unsigned short.
#define equalToInteger   HC_equalToInteger
 equalToInteger(value) - Matches if object is equal to NSNumber created from an NSInteger.
#define equalToUnsignedInteger   HC_equalToUnsignedInteger
 equalToUnsignedInteger(value) - Matches if object is equal to NSNumber created from an NSUInteger.

Detailed Description

Matchers for testing equality against primitive numeric types.

Define Documentation

equalToBool(value) - Matches if object is equal to NSNumber created from a BOOL.

Parameters:
valueThe BOOL value from which to create an NSNumber.

This matcher creates an NSNumber object from a BOOL value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToBool instead.)

equalToChar(value) - Matches if object is equal to NSNumber created from a char.

Parameters:
valueThe char value from which to create an NSNumber.

This matcher creates an NSNumber object from a char value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToChar instead.)

equalToDouble(value) - Matches if object is equal to NSNumber created from a double.

Parameters:
valueThe double value from which to create an NSNumber.

This matcher creates an NSNumber object from a double value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToDouble instead.)

equalToFloat(value) - Matches if object is equal to NSNumber created from a float.

Parameters:
valueThe float value from which to create an NSNumber.

This matcher creates an NSNumber object from a float value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToFloat instead.)

#define equalToInt   HC_equalToInt

equalToInt(value) - Matches if object is equal to NSNumber created from an int.

Parameters:
valueThe int value from which to create an NSNumber.

This matcher creates an NSNumber object from a int value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToInt instead.)

equalToInteger(value) - Matches if object is equal to NSNumber created from an NSInteger.

Parameters:
valueThe NSInteger value from which to create an NSNumber.

This matcher creates an NSNumber object from an NSInteger value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToInteger instead.)

equalToLong(value) - Matches if object is equal to NSNumber created from a long.

Parameters:
valueThe long value from which to create an NSNumber.

This matcher creates an NSNumber object from a long value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToLong instead.)

equalToLongLong(value) - Matches if object is equal to NSNumber created from a long long.

Parameters:
valueThe long long value from which to create an NSNumber.

This matcher creates an NSNumber object from a long long value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToLongLong instead.)

equalToShort(value) - Matches if object is equal to NSNumber created from a short.

Parameters:
valueThe short value from which to create an NSNumber.

This matcher creates an NSNumber object from a short value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToShort instead.)

equalToUnsignedChar(value) - Matches if object is equal to NSNumber created from an unsigned char.

Parameters:
valueThe unsigned char value from which to create an NSNumber.

This matcher creates an NSNumber object from an unsigned char value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedChar instead.)

equalToUnsignedInt(value) - Matches if object is equal to NSNumber created from an unsigned int.

Parameters:
valueThe unsigned int value from which to create an NSNumber.

This matcher creates an NSNumber object from an unsigned int value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedInt instead.)

equalToUnsignedInteger(value) - Matches if object is equal to NSNumber created from an NSUInteger.

Parameters:
valueThe NSUInteger value from which to create an NSNumber.

This matcher creates an NSNumber object from an NSUInteger value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedInteger instead.)

equalToUnsignedLong(value) - Matches if object is equal to NSNumber created from an unsigned long.

Parameters:
valueThe unsigned long value from which to create an NSNumber.

This matcher creates an NSNumber object from an unsigned long value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedLong instead.)

equalToUnsignedLongLong(value) - Matches if object is equal to NSNumber created from an unsigned long long.

Parameters:
valueThe unsigned long long value from which to create an NSNumber.

This matcher creates an NSNumber object from an unsigned long long value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedLongLong instead.)

equalToUnsignedShort(value) - Matches if object is equal to NSNumber created from an unsigned short.

Parameters:
valueThe unsigned short value from which to create an NSNumber.

This matcher creates an NSNumber object from an unsigned short value and compares the evaluated object to it for equality.

(In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_equalToUnsignedShort instead.)