# Interface goog.labs.testing.Matcher

code »

A matcher object to be used in assertThat statements.

Show:Public Protected Private

## Instance Methods

code »describe ( value, opt_description ) ⇒ `string`

Describes why the matcher failed.

Parameters

value: `*`
  The value that didn't match.
opt_description: `string=`
  A partial description to which the reason will be appended.

Returns

Description of why the matcher failed.

code »matches ( value ) ⇒ `boolean`

Determines whether a value matches the constraints of the match.

Parameters

value: `*`
  The object to match.

Returns

Whether the input value matches this matcher.

## Global Functions

code »goog.labs.testing.Matcher.makeMatcher ( matchesFunction, opt_describeFunction ) ⇒ `!Function`

Generates a Matcher from the ‘matches’ and ‘describe’ functions passed in.

Parameters

matchesFunction: `!Function`
  The ‘matches’ function.
opt_describeFunction: `Function=`
  The ‘describe’ function.

Returns

The custom matcher.