Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eddelbuettel/ttdo
Extend tinytest with diffobj
https://github.com/eddelbuettel/ttdo
diff package r unit-testing
Last synced: 3 months ago
JSON representation
Extend tinytest with diffobj
- Host: GitHub
- URL: https://github.com/eddelbuettel/ttdo
- Owner: eddelbuettel
- Created: 2019-08-26T12:56:26.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T22:41:38.000Z (7 months ago)
- Last Synced: 2024-10-12T21:26:16.489Z (3 months ago)
- Topics: diff, package, r, unit-testing
- Language: R
- Size: 396 KB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
Awesome Lists containing this project
- jimsghstars - eddelbuettel/ttdo - Extend tinytest with diffobj (R)
README
## ttdo: Extend 'tinytest' with 'diffobj'
[![CI](https://github.com/eddelbuettel/ttdo/workflows/ci/badge.svg)](https://github.com/eddelbuettel/ttdo/actions?query=workflow%3Aci)
[![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
[![CRAN](https://www.r-pkg.org/badges/version/ttdo)](https://cran.r-project.org/package=ttdo)
[![Dependencies](https://tinyverse.netlify.app/badge/ttdo)](https://cran.r-project.org/package=ttdo)
[![Downloads](https://cranlogs.r-pkg.org/badges/ttdo?color=brightgreen)](https://www.r-pkg.org/pkg/ttdo)
[![Last Commit](https://img.shields.io/github/last-commit/eddelbuettel/ttdo)](https://github.com/eddelbuettel/ttdo)### What is it?
A package to extend [tinytest](https://cran.r-project.org/package=tinytest), a lightweight, no-dependency, full-featured unit testing package, with
[diffobj](https://cran.r-project.org/package=diffobj) which compares [R](https://www.R-Project.org) 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:
![](https://eddelbuettel.github.io/ttdo/ttdoDemo.png)
To test it out yourself, the code is in
[demo/expect_equal_with_diff.R](https://github.com/eddelbuettel/ttdo/blob/master/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](https://cran.r-project.org/package=diffobj/vignettes/diffobj.html#controlling-diffs-and-their-appearance)
for more details.### How do install it?
The package is now on [CRAN](https://cran.r-project.org) and can be installed
via a standard```r
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](https://cran.r-project.org/package=tinytest) package, Brodie
Gaslam for the nifty [diffobj](https://cran.r-project.org/package=diffobj)
package and Michel Lang for
[checkmate.tinytest](https://github.com/mllg/checkmate.tinytest)
demonstrating the extensions mechanism.