Extend 'tinytest' with 'diffobj' and 'tinysnapshot'

The 'tinytest' package offers a light-weight zero-dependency unit-testing framework to which this package adds support via the 'diffobj' package for 'diff'-style textual comparison of R objects, as well as via 'tinysnapshot' package for visual differences in plots.


ttdo: Extend 'tinytest' with 'diffobj'

CI License CRAN Dependencies Downloads Last Commit

What is it?

A package to extend tinytest, a lightweight, no-dependency, full-featured unit testing package, with diffobj which compares R objects with proper diff semantics.

So it tests and compares and, in case of differences, provides informative results.

What does that look like?

Glad you asked:

To test it out yourself, the code is in demo/expect_equal_with_diff.R. If you don't see the same results as above, you may need to manually adjust the diffobj package options. Try options(diffobj.format = "ansi256"). See Controlling Diffs and Their Appearance for more details.

How do install it?

The package is now on CRAN and can be installed via a standard

install.packages("ttdo")

Who wrote it?

Dirk Eddelbuettel and Alton Barbehenn

What license?

GPL (>= 2)

Thanks go to

Mark van der Loo for the excellent tinytest package, Brodie Gaslam for the nifty diffobj package and Michel Lang for checkmate.tinytest demonstrating the extensions mechanism.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ttdo")

0.0.10 by Dirk Eddelbuettel, 2 years ago


https://github.com/eddelbuettel/ttdo/, https://dirk.eddelbuettel.com/code/ttdo.html


Report a bug at https://github.com/eddelbuettel/ttdo/issues


Browse source code at https://github.com/cran/ttdo


Authors: Dirk Eddelbuettel [aut, cre] , Alton Barbehenn [aut]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports tinytest, diffobj, tinysnapshot, base64enc


Suggested by OmicNavigator, faviconPlease.


See at CRAN