Skip to content

Add more assert function types #900

@ngeiswei

Description

@ngeiswei

Implement assert

We have assertEqual and so, but we don't have assert. It is a trivial addition, but my point is that it should probably be part of the stdlib.

To be clear what I mean

!(assert (or True False))

would output

[()]

While

!(assert (and True False))

would raise an error.

Implement assertContain

Another very convenient one would be assertContain (and maybe assertAlphaContain as well) which would check if the expected result is contained in a superposition of results.

For instance

(= (foo) 41)
(= (foo) 42)
(= (foo) 43)

;; Make sure that 42 is part of the solution set of foo
!(assertContain (foo) 42)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions