From 3ba3a6a796c4e9895a6238207f4e7c1729b11d17 Mon Sep 17 00:00:00 2001 From: nathaneastwood Date: Thu, 29 Oct 2020 13:40:06 +0100 Subject: [PATCH] correct 'casted' to 'cast' --- DESCRIPTION | 2 +- R/cast.R | 4 ++-- README.md | 2 +- tests/testthat/test-cast.R | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 8eb58c1..59b78db 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: forge Type: Package Title: Casting Values into Shape -Version: 0.2.0 +Version: 0.2.1 Authors@R: c( person("Kevin", "Kuo", role = c("aut", "cre"), email = "kevin.kuo@rstudio.com", comment = c(ORCID = "0000-0001-7803-7901")) diff --git a/R/cast.R b/R/cast.R index 60c22bf..14816d1 100644 --- a/R/cast.R +++ b/R/cast.R @@ -38,7 +38,7 @@ cast_integer <- function(x, n = NULL, allow_na = FALSE, allow_null = FALSE, id = verify_length_na(x, n, allow_na, id = id) if (!rlang::is_integerish(x)) stop( - backticks(id), " cannot be casted to an integer vector.", + backticks(id), " cannot be cast to an integer vector.", call. = FALSE ) @@ -90,7 +90,7 @@ cast_double <- function(x, n = NULL, allow_na = FALSE, allow_null = FALSE, id = verify_length_na(x, n, allow_na, id = id) if (!rlang::is_double(x) && !rlang::is_integerish(x)) stop( - backticks(id), " cannot be casted to a double vector.", + backticks(id), " cannot be cast to a double vector.", call. = FALSE ) diff --git a/README.md b/README.md index e79e88e..5c9ea1a 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ fib(10) ``` r fib(1.5) -#> Error: `n` cannot be casted to an integer vector. +#> Error: `n` cannot be cast to an integer vector. ``` ``` r diff --git a/tests/testthat/test-cast.R b/tests/testthat/test-cast.R index c481c29..65ae522 100644 --- a/tests/testthat/test-cast.R +++ b/tests/testthat/test-cast.R @@ -16,7 +16,7 @@ test_that("cast_integer() works properly", { expect_error(cast_integer(NULL), "`x` must not be NULL\\.") expect_error(cast_integer(1:3, 2), "`x` must be of length 2, but is of length 3\\.") - expect_error(cast_integer(1.2), "`x` cannot be casted to an integer vector\\.") + expect_error(cast_integer(1.2), "`x` cannot be cast to an integer vector\\.") expect_error(cast_integer(NA), "`x` must not contain NAs\\.") expect_error(cast_integer(1:2, c(1, 2)), "`n` must be an integer\\.") expect_error(cast_scalar_integer(1:3), "`x` must be of length 1, but is of length 3\\.") @@ -99,5 +99,5 @@ test_that("cast_logical() works properly", { test_that("`id` argument works", { foo <- 4.5 - expect_error(cast_scalar_integer(foo), "`foo` cannot be casted to an integer vector\\.") + expect_error(cast_scalar_integer(foo), "`foo` cannot be cast to an integer vector\\.") })