tinytest: Expectation for comparing shades

expect_equal_shadesR Documentation

Expectation for comparing shades

Description

This function provides an expectation for use with the tinytest package, which compares two colour vectors via all.equal.shade(hexonly=TRUE). It evaluates TRUE if the vectors have the same length and resolve to the same hex colour strings.

Usage

expect_equal_shades(current, target, ..., info = NA_character_)

Arguments

current

The colour vector to test.

target

The target values to compare against, in any form valid for casting to shade().

...

Further arguments to all.equal().

info

An optional information string shown in case of failure.

Value

A "tinytest" object.


jonclayden/shades documentation built on Oct. 17, 2024, 4:52 p.m.