-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for color utilities and global settings (#285)
* Tests for color utilities * tests for global settings * Use functions for error messages
- Loading branch information
1 parent
1d7e876
commit f402204
Showing
6 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# nocov start | ||
.onLoad <- function(...) { | ||
options(warnPartialMatchDollar = TRUE) | ||
Sys.setenv("_R_CHECK_LENGTH_1_CONDITION_" = "true") | ||
} | ||
# nocov end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Names for settings are as expected | ||
|
||
Code | ||
esqlabsRSettingNames | ||
Output | ||
$packageVersion | ||
[1] "packageVersion" | ||
$packageName | ||
[1] "packageName" | ||
$widthPerPlotMapping | ||
[1] "widthPerPlotMapping" | ||
$heightPerPlotMapping | ||
[1] "heightPerPlotMapping" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
test_that("Names for settings are as expected", { | ||
expect_snapshot(esqlabsRSettingNames) | ||
}) | ||
|
||
test_that("Check that values for package environment bindings are correct", { | ||
expect_error( | ||
getEsqlabsRSetting("xyz"), | ||
messages$errorPackageSettingNotFound("xyz", esqlabsEnv) | ||
) | ||
|
||
expect_equal(getEsqlabsRSetting("packageName"), "esqlabsR") | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters