The hamcrest Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The hamcrest Reference Manual

This is the hamcrest Reference Manual, version 0.3.4, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:10:17 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

=============
 cl-hamcrest
=============

.. image:: https://travis-ci.org/40ants/cl-hamcrest.svg?branch=master
    :target: https://travis-ci.org/40ants/cl-hamcrest

.. include-from

It is implementation of `Hamcrest`_ idea in Common Lisp.

It simplifes unittests and make them more readable. Hamcrest uses
idea of pattern-matching, to construct matchers from different pieces and
to apply them to the data.

Why not pattern-matching library?
=================================

You may ask: "Why dont use a pattern-matching library, like `Optima`_?"

Here is another example from another library ``log4cl-json``, where I want
to check that some fields in plist have special values and other key is not
present. Here is the data:

.. code-block:: common-lisp

   (defvar log-item '(:|@message| "Some"
                      :|@timestamp| 122434342
                      ;; this field is wrong and
                      ;; shouldn't be here
                      :|@fields| nil))

With `Optima`_ I could write this code to match the data:

.. code-block:: common-lisp

   (ok (ematch
         log-item
       ((and (guard (property :|@message| m)
                    (equal m "Some"))
             (property :|@timestamp| _)
             (not (property :|@fields| _)))
        t))
     "Log entry has message, timestamp, but not fields")

But error message will be quite cumbersome:

.. code-block:: none

  × Aborted due to an error in subtest "Simple match"
    Raised an error Can't match ((:|@fields| NIL :|@timestamp|
                                  "2017-01-03T16:42:00.991444Z" :|@message|
                                  "Some")) with ((COMMON-LISP:AND
                                                  (GUARD
                                                   (PROPERTY :|@message| M)
                                                   (EQUAL M "Some"))
                                                  (PROPERTY :|@timestamp|
                                                   _)
                                                  (NOT
                                                   (PROPERTY :|@fields|
                                                    _)))). (expected: :NON-ERROR)


CL-HAMCREST is more concise and clear
-------------------------------------

With ``cl-hamcrest`` test becomes more readable:

.. code-block:: common-lisp

   (assert-that
         log-item
         (has-plist-entries :|@message| "Some"
                            :|@timestamp| _)
         (hasnt-plist-keys :|@fields|))

As well, as output about the failure:

.. code-block:: none

  × Key :|@fields| is present in object, but shouldn't

That is because ``cl-hamcrest`` tracks the context and works
together with testing framework, to output all information
to let you understand where the problem is.

Why not just use Prove's assertions?
------------------------------------

To draw a full picture, here is test, written in plain Prove's
assertions:

.. code-block:: common-lisp

   (ok (member :|@message| log-item))
   (is (getf log-item :|@message|)
       "Some")
   (ok (member :|@timestamp| log-item))
   (ok (not (member :|@fields| log-item)))

And it's output:

.. code-block:: none

   ✓ (:|@message| "Some") is expected to be T 
   ✓ "Some" is expected to be "Some" 
   ✓ (:|@timestamp| "2017-01-03T16:57:17.988810Z" :|@message| "Some") is expected to be T 
   × NIL is expected to be T 

is not as clear, if you'll try to figure out
what does ``NIL is expected to be T`` mean.

Description of all supported matchers, you can `find in the
documentation `_.

Roadmap
=======

* Logical matchers:

  - ``all-of`` – rename ``has-all``.
  - ``any-of`` – Matches if any of the given matchers evaluate to True.
  - ``is-not`` – Inverts the given matcher to its logical negation (think if
    we need it, and how to show the results, here are results
    how it works `in PyHamcrest `_
    – it just sees that matcher returned True and raises Assertion error with full object's content and
    matcher's description with prepended 'not' particle).

* Object matchers:

  - Add ``hasnt-some-keys`` matchers, corresponding to
    ``has-some-entries``.
  - Make ``has-alist-entries`` work with keys other than keyword
    right now it uses `eql` to compare keys.

* Sequence matchers:

  - ``is-in`` – Matches if evaluated object is present in a given sequence.
  - ``has-items`` – Matches if all of the given matchers are satisfied by any elements of the sequence.
  - ``only-contains`` – Matches if each element of sequence satisfies
    any of the given matchers.

* Other features:

  - Use uniq CommonLisp feature to restart signaled conditions to collect
    all problems with data when there are few problems with keys.

.. _Hamcrest: http://hamcrest.org
.. _Optima: http://quickdocs.org/optima/

.. include-to

Building Documentation
======================

Requirements
------------

Python packages
~~~~~~~~~~~~~~~

sphinx
sphinxcontrib-cldomain (https://github.com/russell/sphinxcontrib-cldomain)
pygments-cl-repl
sphinx-bootstrap-theme

Lisp
~~~~

cl-launch (http://www.cliki.net/CL-Launch)

To build
--------

cd docs && make html


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Next: , Previous: , Up: Systems   [Contents][Index]

2.1 hamcrest

Author

Alexander Artemenko

License

New BSD License

Description

A set of helpers to make your unittests more readable by using Hamcrest assertions.

Long Description

=============
cl-hamcrest
=============

.. image:: https://travis-ci.org/40ants/cl-hamcrest.svg?branch=master
:target: https://travis-ci.org/40ants/cl-hamcrest

.. include-from

It is implementation of ‘Hamcrest‘_ idea in Common Lisp.

It simplifes unittests and make them more readable. Hamcrest uses
idea of pattern-matching, to construct matchers from different pieces and
to apply them to the data.

Why not pattern-matching library?
=================================

You may ask: "Why dont use a pattern-matching library, like ‘Optima‘_?"

Here is another example from another library “log4cl-json“, where I want
to check that some fields in plist have special values and other key is not
present. Here is the data:

.. code-block:: common-lisp

(defvar log-item ’(:|@message| "Some"
:|@timestamp| 122434342
;; this field is wrong and
;; shouldn’t be here
:|@fields| nil))

With ‘Optima‘_ I could write this code to match the data:

.. code-block:: common-lisp

(ok (ematch
log-item
((and (guard (property :|@message| m)
(equal m "Some"))
(property :|@timestamp| _)
(not (property :|@fields| _)))
t))
"Log entry has message, timestamp, but not fields")

But error message will be quite cumbersome:

.. code-block:: none

× Aborted due to an error in subtest "Simple match"
Raised an error Can’t match ((:|@fields| NIL :|@timestamp|
"2017-01-03T16:42:00.991444Z" :|@message|
"Some")) with ((COMMON-LISP:AND (GUARD
(PROPERTY :|@message| M)
(EQUAL M "Some"))
(PROPERTY :|@timestamp| _) (NOT
(PROPERTY :|@fields|
_)))). (expected: :NON-ERROR)

CL-HAMCREST is more concise and clear
————————————-

With “cl-hamcrest“ test becomes more readable:

.. code-block:: common-lisp

(assert-that
log-item
(has-plist-entries :|@message| "Some"
:|@timestamp| _)
(hasnt-plist-keys :|@fields|))

As well, as output about the failure:

.. code-block:: none

× Key :|@fields| is present in object, but shouldn’t

That is because “cl-hamcrest“ tracks the context and works
together with testing framework, to output all information
to let you understand where the problem is.

Why not just use Prove’s assertions?
————————————

To draw a full picture, here is test, written in plain Prove’s
assertions:

.. code-block:: common-lisp

(ok (member :|@message| log-item))
(is (getf log-item :|@message|)
"Some")
(ok (member :|@timestamp| log-item))
(ok (not (member :|@fields| log-item)))

And it’s output:

.. code-block:: none

✓ (:|@message| "Some") is expected to be T
✓ "Some" is expected to be "Some"
✓ (:|@timestamp| "2017-01-03T16:57:17.988810Z" :|@message| "Some") is expected to be T
× NIL is expected to be T

is not as clear, if you’ll try to figure out
what does “NIL is expected to be T“ mean.

Description of all supported matchers, you can ‘find in the
documentation <http://cl-hamcrest.40ants.com>‘_.

Roadmap
=======

* Logical matchers:

- “all-of“ – rename “has-all“.
- “any-of“ – Matches if any of the given matchers evaluate to True.
- “is-not“ – Inverts the given matcher to its logical negation (think if
we need it, and how to show the results, here are results
how it works ‘in PyHamcrest <https://gist.github.com/svetlyak40wt/fbe480384e9e3f75b10523aa0b4fb6ce>‘_ – it just sees that matcher returned True and raises Assertion error with full object’s content and matcher’s description with prepended ’not’ particle).

* Object matchers:

- Add “hasnt-some-keys“ matchers, corresponding to
“has-some-entries“.
- Make “has-alist-entries“ work with keys other than keyword
right now it uses ‘eql‘ to compare keys.

* Sequence matchers:

- “is-in“ – Matches if evaluated object is present in a given sequence.
- “has-items“ – Matches if all of the given matchers are satisfied by any elements of the sequence. - “only-contains“ – Matches if each element of sequence satisfies
any of the given matchers.

* Other features:

- Use uniq CommonLisp feature to restart signaled conditions to collect
all problems with data when there are few problems with keys.

.. _Hamcrest: http://hamcrest.org
.. _Optima: http://quickdocs.org/optima/

.. include-to

Building Documentation
======================

Requirements
————

Python packages
~~~~~~~~~~~~~~~

sphinx
sphinxcontrib-cldomain (https://github.com/russell/sphinxcontrib-cldomain)
pygments-cl-repl
sphinx-bootstrap-theme

Lisp
~~~~

cl-launch (http://www.cliki.net/CL-Launch)

To build
——–

cd docs && make html

Version

0.3.4

Dependencies
Source

hamcrest.asd (file)


Next: , Previous: , Up: Systems   [Contents][Index]

2.2 hamcrest/matchers

Dependencies
Source

hamcrest.asd (file)

Component

lisp.lisp (file)


Previous: , Up: Systems   [Contents][Index]

2.3 hamcrest/utils

Dependencies
Source

hamcrest.asd (file)

Component

lisp.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 hamcrest.asd

Location

/home/quickref/quicklisp/dists/quicklisp/software/cl-hamcrest-20180328-git/hamcrest.asd

Systems

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 hamcrest/matchers/lisp.lisp

Parent

hamcrest/matchers (system)

Location

matchers.lisp

Packages

hamcrest/matchers

Exported Definitions
Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.3 hamcrest/utils/lisp.lisp

Parent

hamcrest/utils (system)

Location

utils.lisp

Packages

hamcrest/utils

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 hamcrest/matchers

Source

lisp.lisp (file)

Use List
Exported Definitions
Internal Definitions

Previous: , Up: Packages   [Contents][Index]

4.2 hamcrest/utils

Source

lisp.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: contains &rest ENTRIES

Checks if each item from a list matches to given matchers.

Contains can accept as raw values, as another matchers:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo
(a b c)
d)
(contains :foo
(has-length 3) ’d))
✓ Contains all given values

Given list should have a length equal to count of matchers:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo
(a b c)
d)
(contains :foo))
× Expected value is shorter than result

You can ignore value of some list items, by using “(any)“ matcher:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo
(a b c)
d)
(contains :foo (any) (any)))
✓ Contains all given values

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: contains-in-any-order &rest ENTRIES

Same as “contains“, but items in the sequence can be in any order:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo
(a b c)
d) (contains-in-any-order
(has-length 3)
’d
:foo))

✓ Contains all given values

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: has-alist-entries &rest ENTRIES

Matches alist entries:

.. code-block:: common-lisp-repl

TEST> (let ((obj ’((:the-key . "value"))))
(assert-that obj
(has-alist-entries :the-key "value")))
✓ Has alist entries:
:THE-KEY = "value"

TEST> (let ((obj ’((:the-key . "value"))))
(assert-that obj
(has-alist-entries :the-key "value" :missing-key "value")))
× Key :MISSING-KEY is missing

TEST> (let ((obj ’((:the-key . "value"))))
(assert-that obj
(has-alist-entries :the-key "other-value")))
× Key :THE-KEY has "value" value, but "other-value" was expected

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: has-hash-entries &rest ENTRIES

Matches hash entries:

.. code-block:: common-lisp-repl

TEST> (let ((obj (make-hash-table)))
(setf (gethash ’the-key obj) "value")
(assert-that obj
(has-hash-entries ’the-key "value")))
✓ Has hash entries:
THE-KEY = "value"

TEST> (let ((obj (make-hash-table)))
(setf (gethash ’the-key obj) "value")
(assert-that obj
(has-hash-entries ’missing-key "value")))
× Key MISSING-KEY is missing

TEST> (let ((obj (make-hash-table)))
(setf (gethash ’the-key obj) "value")
(assert-that obj
(has-hash-entries ’the-key "other-value")))
× Key THE-KEY has "value" value, but "other-value" was expected

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: has-plist-entries &rest ENTRIES

Matches plist entries:

.. code-block:: common-lisp-repl

TEST> (let ((obj ’(:foo :bar)))
(assert-that obj
(has-plist-entries :foo "bar" :blah "minor"))) × Key :FOO has :BAR value, but "bar" was expected

This way you can test any number of plist’s entries.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: has-properties &rest ENTRIES

Matches object properties:

.. code-block:: common-lisp-repl

TEST> (defvar the-object)
THE-OBJECT
TEST> (setf (getf the-object :tags) ’(one two))
TEST> (assert-that ’the-object
(has-properties :tags ’(one two)))
✓ Has properties:
:TAGS = (ONE TWO)

TEST> (assert-that ’the-object
(has-properties :tags ’wrong-value))
× Property :TAGS has (ONE TWO) value, but WRONG-VALUE was expected
TEST> (assert-that ’the-object
(has-properties :missing-property ’(one two))) × Property :MISSING-PROPERTY is missing

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: has-slots &rest ENTRIES

Matches object slots:

.. code-block:: common-lisp-repl

TEST> (defstruct task
title
description)

TEST> (defvar task (make-task :title "The title "))

TEST> (assert-that task
(has-slots ’title "The title "))
✓ Has slots:
TITLE = "The title "

TEST> (assert-that task
(has-slots ’title "Wrong title "))
× Slot TITLE has "The title " value, but "Wrong title " was expected
TEST> (assert-that task
(has-slots ’description nil))
✓ Has slots:
DESCRIPTION = NIL

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: hasnt-plist-keys &rest KEYS

Checks if given keys are missing from an object:

.. code-block:: common-lisp-repl

TEST> (let ((obj ’(:foo "bar")))
(assert-that obj
(hasnt-plist-keys :blah :minor))) ✓ Keys :BLAH, :MINOR are absent

Assertion fails if at least one key is present in the object:

.. code-block:: common-lisp-repl

TEST> (let ((obj ’(:foo "bar")))
(assert-that obj
(hasnt-plist-keys :blah :foo)))
× Key :FOO is present in object, but shouldn’t.

Package

hamcrest/matchers

Source

lisp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: alistp VALUE

Checks if give value is a proper alist.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: any ()

Assertion is passed regardles of value of the object:

.. code-block:: common-lisp-repl

TEST> (assert-that 1 (any))
✓ Any value if good enough

TEST> (assert-that "the-string" (any))
✓ Any value if good enough

TEST> (assert-that ’the-symbol (any))
✓ Any value if good enough

TEST> (assert-that ’(1 2 3) (any))
✓ Any value if good enough

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: assertion-error-reason-with-context CONDITION &key INDENT-SPACES

Returns a multiline string where error reason is nested into the context like that:

Item with index 1:
Alist entry with key :NAME
Alist entry with key :FIRST is required

Parameter :indent-spaces could be specified to control number of spaces for each indentation level.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: deindent TEXT

Removes empty new lines at the begining and at the end of the text, and removes common number of whitespaces from rest of the lines.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: has-all &rest MATCHERS

Makes a matcher which groups another matchers with AND logic.

This way we can check if plist has one key and hasn’t another. And if all matchers succeed, then “has-all“ succeed as well:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo "bar")
(has-all (has-plist-entries :foo "bar") (hasnt-plist-keys :blah))) ✓ All checks are passed

If at least one check is failed, then “has-all“ fails too:

.. code-block:: common-lisp-repl

TEST> (assert-that ’(:foo "bar" :blah "minor")
(has-all (has-plist-entries :foo "bar") (hasnt-plist-keys :blah))) × Key :BLAH is present in object, but shouldn’t

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: has-length EXPECTED-LENGTH

Checks if a list have specivied length.

.. code-block:: common-lisp-repl

TEST> (assert-that ’nil (has-length 0))
✓ Has length of 0

TEST> (assert-that ’(a b c d) (has-length 4))
✓ Has length of 4

TEST> (assert-that ’(a b c d) (has-length 100500))
× List (A B C D) has length of 4, but 100500 was expected

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: indent SPACE &optional COUNT

Creates a string with a number of spaces to indent new line of a test report.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: matcher-description FN

Returns description of a given matcher function.

Can be used to print nested matchers in a nicely indented,
human readable way:

.. code-block:: common-lisp-repl

TEST> (matcher-description (has-length 100500))
"Has length of 100500 "

TEST> (matcher-description (contains
(has-plist-entries :foo "bar ") (has-plist-entries :foo "minor "))) "Contains all given values "

TEST> (matcher-description (has-plist-entries
:foo "bar "
:blah (has-hash-entries :minor "again "))) "Has plist entries:
:FOO = "bar"
:BLAH = Has hash entries:
:MINOR = "again""

Package

hamcrest/matchers

Source

lisp.lisp (file)

Setf Expander

(setf matcher-description) (setf expander)

Setf Expander: (setf matcher-description) FN
Package

hamcrest/matchers

Source

lisp.lisp (file)

Reader

matcher-description (function)

Function: matcher-form FN

Returns description of a given matcher function.

Can be used to print nested matchers in a nicely indented,
human readable way:

.. code-block:: common-lisp-repl

TEST> (matcher-description (has-length 100500))
"Has length of 100500 "

TEST> (matcher-description (contains
(has-plist-entries :foo "bar ") (has-plist-entries :foo "minor "))) "Contains all given values "

TEST> (matcher-description (has-plist-entries
:foo "bar "
:blah (has-hash-entries :minor "again "))) "Has plist entries:
:FOO = "bar"
:BLAH = Has hash entries:
:MINOR = "again""

Package

hamcrest/matchers

Source

lisp.lisp (file)

Setf Expander

(setf matcher-form) (setf expander)

Setf Expander: (setf matcher-form) FN
Package

hamcrest/matchers

Source

lisp.lisp (file)

Reader

matcher-form (function)

Function: shift-rest-lines TEXT INDENT

Adds text from ’indent’ to all lines from the ’text’ except the first one.

Package

hamcrest/utils

Source

lisp.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Generic functions

Generic Function: assertion-context CONDITION
Package

hamcrest/matchers

Methods
Method: assertion-context (CONDITION assertion-error)
Source

lisp.lisp (file)

Generic Function: assertion-error-reason CONDITION
Package

hamcrest/matchers

Methods
Method: assertion-error-reason (CONDITION assertion-error)
Source

lisp.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.4 Conditions

Condition: assertion-error ()
Package

hamcrest/matchers

Source

lisp.lisp (file)

Direct superclasses

error (condition)

Direct methods
Direct slots
Slot: reason
Initargs

:reason

Readers

assertion-error-reason (generic function)

Slot: context
Initform

(quote (copy-list hamcrest/matchers::*context*))

Readers

assertion-context (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *context*

Context description for nested matchers.

When some matcher calls another, it should push it’s description to this list. And after successful matching to pop item from the list.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Special Variable: *matcher-descriptions*

In some implementation it is impossible to have documentation in functions created with flet, labels or lambda, that is why we’ll store their docstrings in this cache

Package

hamcrest/matchers

Source

lisp.lisp (file)

Special Variable: *matcher-forms*

TODO: ..

Package

hamcrest/matchers

Source

lisp.lisp (file)


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Macros

Macro: def-has-macro MACRO-NAME DOCUMENTATION &key CHECK-OBJ-TYPE GET-KEY-VALUE FORMAT-ERROR-MESSAGE FORMAT-MATCHER-DESCRIPTION

Defines a new macro to check if object has some properties.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: format-expected-entries PREFIX-TEXT

This macro is for formatting description of matchers which expect some key/value entries, like (has-plist-entries :foo 1 :bar 2).

Package

hamcrest/matchers

Source

lisp.lisp (file)

Macro: with-context DESCRIPTION &body BODY

Manages *context* stack when calling nested matchers.

Package

hamcrest/matchers

Source

lisp.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.3 Functions

Function: check-if-alist VALUE

A little helper, to check types in matchers

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: check-if-has-slots OBJECT

A little helper, to check if object is instance of a class and has slots.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: check-if-hash VALUE

A little helper, to check types in matchers

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: check-if-list VALUE

A little helper, to check types in matchers

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: check-if-symbol VALUE

A little helper, to check types in matchers.

Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: empty-line-p LINE

Checks if line of text is empty.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: get-indentation LINE

Returns numbers of leading spaces for the line.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: left-remove-if ITEMS PREDICATE

Returns list skipping leftmost items which match a predicate.

Package

hamcrest/utils

Source

lisp.lisp (file)

Function: quote-underline VALUE
Package

hamcrest/matchers

Source

lisp.lisp (file)

Function: right-remove-if ITEMS PREDICATE

Returns a new list, without rightmost items which match a predicate.

Package

hamcrest/utils

Source

lisp.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L  
Index Entry  Section

F
File, Lisp, hamcrest.asd: The hamcrest<dot>asd file
File, Lisp, hamcrest/matchers/lisp.lisp: The hamcrest/matchers/lisp<dot>lisp file
File, Lisp, hamcrest/utils/lisp.lisp: The hamcrest/utils/lisp<dot>lisp file

H
hamcrest.asd: The hamcrest<dot>asd file
hamcrest/matchers/lisp.lisp: The hamcrest/matchers/lisp<dot>lisp file
hamcrest/utils/lisp.lisp: The hamcrest/utils/lisp<dot>lisp file

L
Lisp File, hamcrest.asd: The hamcrest<dot>asd file
Lisp File, hamcrest/matchers/lisp.lisp: The hamcrest/matchers/lisp<dot>lisp file
Lisp File, hamcrest/utils/lisp.lisp: The hamcrest/utils/lisp<dot>lisp file

Jump to:   F   H   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   C   D   E   F   G   H   I   L   M   Q   R   S   W  
Index Entry  Section

(
(setf matcher-description): Exported functions
(setf matcher-form): Exported functions

A
alistp: Exported functions
any: Exported functions
assertion-context: Exported generic functions
assertion-context: Exported generic functions
assertion-error-reason: Exported generic functions
assertion-error-reason: Exported generic functions
assertion-error-reason-with-context: Exported functions

C
check-if-alist: Internal functions
check-if-has-slots: Internal functions
check-if-hash: Internal functions
check-if-list: Internal functions
check-if-symbol: Internal functions
contains: Exported macros
contains-in-any-order: Exported macros

D
def-has-macro: Internal macros
deindent: Exported functions

E
empty-line-p: Internal functions

F
format-expected-entries: Internal macros
Function, alistp: Exported functions
Function, any: Exported functions
Function, assertion-error-reason-with-context: Exported functions
Function, check-if-alist: Internal functions
Function, check-if-has-slots: Internal functions
Function, check-if-hash: Internal functions
Function, check-if-list: Internal functions
Function, check-if-symbol: Internal functions
Function, deindent: Exported functions
Function, empty-line-p: Internal functions
Function, get-indentation: Internal functions
Function, has-all: Exported functions
Function, has-length: Exported functions
Function, indent: Exported functions
Function, left-remove-if: Internal functions
Function, matcher-description: Exported functions
Function, matcher-form: Exported functions
Function, quote-underline: Internal functions
Function, right-remove-if: Internal functions
Function, shift-rest-lines: Exported functions

G
Generic Function, assertion-context: Exported generic functions
Generic Function, assertion-error-reason: Exported generic functions
get-indentation: Internal functions

H
has-alist-entries: Exported macros
has-all: Exported functions
has-hash-entries: Exported macros
has-length: Exported functions
has-plist-entries: Exported macros
has-properties: Exported macros
has-slots: Exported macros
hasnt-plist-keys: Exported macros

I
indent: Exported functions

L
left-remove-if: Internal functions

M
Macro, contains: Exported macros
Macro, contains-in-any-order: Exported macros
Macro, def-has-macro: Internal macros
Macro, format-expected-entries: Internal macros
Macro, has-alist-entries: Exported macros
Macro, has-hash-entries: Exported macros
Macro, has-plist-entries: Exported macros
Macro, has-properties: Exported macros
Macro, has-slots: Exported macros
Macro, hasnt-plist-keys: Exported macros
Macro, with-context: Internal macros
matcher-description: Exported functions
matcher-form: Exported functions
Method, assertion-context: Exported generic functions
Method, assertion-error-reason: Exported generic functions

Q
quote-underline: Internal functions

R
right-remove-if: Internal functions

S
Setf Expander, (setf matcher-description): Exported functions
Setf Expander, (setf matcher-form): Exported functions
shift-rest-lines: Exported functions

W
with-context: Internal macros

Jump to:   (  
A   C   D   E   F   G   H   I   L   M   Q   R   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
C   R   S  
Index Entry  Section

*
*context*: Internal special variables
*matcher-descriptions*: Internal special variables
*matcher-forms*: Internal special variables

C
context: Exported conditions

R
reason: Exported conditions

S
Slot, context: Exported conditions
Slot, reason: Exported conditions
Special Variable, *context*: Internal special variables
Special Variable, *matcher-descriptions*: Internal special variables
Special Variable, *matcher-forms*: Internal special variables

Jump to:   *  
C   R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   H   P   S  
Index Entry  Section

A
assertion-error: Exported conditions

C
Condition, assertion-error: Exported conditions

H
hamcrest: The hamcrest system
hamcrest/matchers: The hamcrest/matchers system
hamcrest/matchers: The hamcrest/matchers package
hamcrest/utils: The hamcrest/utils system
hamcrest/utils: The hamcrest/utils package

P
Package, hamcrest/matchers: The hamcrest/matchers package
Package, hamcrest/utils: The hamcrest/utils package

S
System, hamcrest: The hamcrest system
System, hamcrest/matchers: The hamcrest/matchers system
System, hamcrest/utils: The hamcrest/utils system

Jump to:   A   C   H   P   S