Skip to content

Commit

Permalink
switch over to testthat 3
Browse files Browse the repository at this point in the history
  • Loading branch information
clauswilke committed Nov 26, 2020
1 parent e12e676 commit 1347723
Show file tree
Hide file tree
Showing 30 changed files with 587 additions and 28 deletions.
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: gridtext
Type: Package
Title: Improved Text Rendering Support for 'Grid' Graphics
Version: 0.1.1.9000
Version: 0.1.2
Authors@R:
person(
given = "Claus O.",
Expand All @@ -25,6 +25,7 @@ Imports:
rlang,
Rcpp,
RCurl,
systemfonts,
png,
jpeg,
stringr,
Expand All @@ -41,6 +42,7 @@ LinkingTo:
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.0.2
Config/testthat/edition: 3
Roxygen: list(markdown = TRUE)
SystemRequirements: C++11

4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# gridtext 0.1.2

- Fix build for testthat 3.0.

# gridtext 0.1.1

- `richtext_grob()` and `textbox_grob()` now gracefully handle empty strings
Expand Down
2 changes: 1 addition & 1 deletion R/catch-routine-registration.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# 'tools::package_native_routine_registration_skeleton()' generates the required
# registration info for the 'run_testthat_tests' symbol.
(function() {
.Call("run_testthat_tests", PACKAGE = "gridtext")
.Call("run_testthat_tests", FALSE, PACKAGE = "gridtext")
})
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Minor fixes required for upcoming changes in R devel grid.
This is a minor update making this package compatible with testthat 3.0.0.

## Test environments
* ubuntu 14.04 (on travis-ci), devel and release
* win-builder (devel and release)
* local OS X install, R 3.6.0
* R version 4.0.2 on x86_64-apple-darwin15.6.0 (64-bit) (local install)

## R CMD check results

Expand Down
4 changes: 2 additions & 2 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ BEGIN_RCPP
END_RCPP
}

RcppExport SEXP run_testthat_tests();
RcppExport SEXP run_testthat_tests(SEXP);

static const R_CallMethodDef CallEntries[] = {
{"_gridtext_bl_make_null_box", (DL_FUNC) &_gridtext_bl_make_null_box, 2},
Expand Down Expand Up @@ -438,7 +438,7 @@ static const R_CallMethodDef CallEntries[] = {
{"_gridtext_rect_grob", (DL_FUNC) &_gridtext_rect_grob, 6},
{"_gridtext_roundrect_grob", (DL_FUNC) &_gridtext_roundrect_grob, 7},
{"_gridtext_set_grob_coords", (DL_FUNC) &_gridtext_set_grob_coords, 3},
{"run_testthat_tests", (DL_FUNC) &run_testthat_tests, 0},
{"run_testthat_tests", (DL_FUNC) &run_testthat_tests, 1},
{NULL, NULL, 0}
};

Expand Down
1 change: 1 addition & 0 deletions src/test-runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
* 'run_testthat_tests()' C routine that can be used to run the Catch unit tests
* available in your package.
*/
#define CATCH_CONFIG_RUNNER
#define TESTTHAT_TEST_RUNNER
#include <testthat.h>
41 changes: 41 additions & 0 deletions tests/figs/aligned-heights.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions tests/figs/aligned-widths.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1347723

Please sign in to comment.