ignore_differences {realtest}R Documentation

Example Object and Side Effect Comparers

Description

Example two-argument functions to compare direct or indirect effects of two test descriptors (see P and R). These can be passed as value_comparer and sides_comparer to E.

Usage

ignore_differences(x, y)

sides_similar(x, y)

Arguments

x

prototype or part thereof

y

object under scrutiny or part thereof

Details

Notable built-in (base R) comparers include identical (the strictest possible) and all.equal (can ignore, amongst others, round-off errors; note that it is an S3 generic).

ignore_differences is a dummy comparer that always returns TRUE. Hence, it does not discriminate between anything.

sides_similar is useful when comparing side effect lists. It defines the following semantics for the prototypical values:

You can define any comparers of your own liking: the possibilities are endless. For example:

and so forth.

Value

Each comparer should yield TRUE if the test condition is considered met or anything else otherwise. However, it is highly recommended that in the latter case, a single string with a short summary of the differences be returned, as in all.equal.

Author(s)

Marek Gagolewski

See Also

The official online manual of realtest at https://realtest.gagolewski.com/


[Package realtest version 0.2.3 Index]