Skip to main content

to_be_less_or_equal_than

Method of AlephExpectation.

Overloads

NameDescription
to_be_less_or_equal_than(real expected) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.
to_be_less_or_equal_than(real expected, const Map options) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.
to_be_less_or_equal_than(integer expected) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.
to_be_less_or_equal_than(integer expected, const Map options) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.
to_be_less_or_equal_than(const Object expected) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.
to_be_less_or_equal_than(const Object expected, const Map options) -> voidRecords a failure unless the actual numeric value is less than or equal to expected.

to_be_less_or_equal_than(real expected) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3)

to_be_less_or_equal_than(real expected, const Map options) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.
  • options: Optional matcher options.
    • message (String): Custom failure message to record when the matcher fails.
    • stop (Bool): Stops collecting further expectations in the current test when this matcher fails.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3, ["message": "expected a small enough value"])

to_be_less_or_equal_than(integer expected) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3)

to_be_less_or_equal_than(integer expected, const Map options) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.
  • options: Optional matcher options.
    • message (String): Custom failure message to record when the matcher fails.
    • stop (Bool): Stops collecting further expectations in the current test when this matcher fails.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3, ["message": "expected a small enough value"])

to_be_less_or_equal_than(const Object expected) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3)

to_be_less_or_equal_than(const Object expected, const Map options) -> void

Records a failure unless the actual numeric value is less than or equal to expected.

Parameters

  • expected: The comparison value.
  • options: Optional matcher options.
    • message (String): Custom failure message to record when the matcher fails.
    • stop (Bool): Stops collecting further expectations in the current test when this matcher fails.

Returns

Nothing. Failed expectations are collected in the active test result.

Example


expect(3).to_be_less_or_equal_than(3, ["message": "expected a small enough value"])