Skip to content

Commit

Permalink
Change reference results for R 4.0.0
Browse files Browse the repository at this point in the history
Seem to behave like 3.6.2 as of 2020-07-12.
  • Loading branch information
kaz-yos committed Jul 12, 2020
1 parent 86c875a commit 51ffb44
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/testthat/test-svyCreateTableOne.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ test_that("printing of a svyTableOne object does not regress", {
"ref-svyTableOne_IncludeNA")

## 2020-02-29 Error due to solve() behavior change in R 3.6.2.
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2) {
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2 |
as.numeric(R.Version()$major) >= 4) {
expect_equal_to_reference(print(mwByEC1, printToggle = TRUE),
"ref-svyTableOne_2StrataVars_new")
} else {
Expand Down Expand Up @@ -238,7 +239,8 @@ test_that("printing of a svyTableOne object does not regress", {
"ref-svyTableOne_noSpaces_showAllLevels_quote")

## 2020-02-29 Error due to solve() behavior change in R 3.6.2.
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2) {
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2 |
as.numeric(R.Version()$major) >= 4) {
expect_equal_to_reference(print(mwContOnlyByEC1),
"ref-svyTableOne_ContOnly_new")
} else {
Expand All @@ -253,7 +255,8 @@ test_that("printing of a svyTableOne object does not regress", {
"ref-svyTableOne_addOverall")

## 2020-02-29 Error due to solve() behavior change in R 3.6.2.
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2) {
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2 |
as.numeric(R.Version()$major) >= 4) {
expect_equal_to_reference(print(mwByEC1_addOverall, printToggle = TRUE, test = TRUE, smd = TRUE),
"ref-svyTableOne_2StrataVars_addOverall_new")
} else {
Expand Down Expand Up @@ -339,7 +342,8 @@ test_that("printing of a svyTableOne$ContTable object do not regress", {
"ref-svyContTable_overallPrint")

## 2020-02-29 Error due to solve() behavior change in R 3.6.2.
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2) {
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2 |
as.numeric(R.Version()$major) >= 4) {
expect_equal_to_reference(print(mwByEC1$ContTable, printToggle = TRUE),
"ref-svyContTable_2StrataVars_new")
} else {
Expand Down Expand Up @@ -374,7 +378,8 @@ test_that("printing of a svyTableOne$ContTable object do not regress", {
"ref-svyContTable_addOverall")

## 2020-02-29 Error due to solve() behavior change in R 3.6.2.
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2) {
if (as.numeric(R.Version()$major) >= 3 & as.numeric(R.Version()$minor) == 6.2 |
as.numeric(R.Version()$major) >= 4) {
expect_equal_to_reference(print(mwByEC1_addOverall$ContTable, printToggle = TRUE, test = TRUE, smd = TRUE),
"ref-svyContTable_2StrataVars_addOverall_new")
} else {
Expand Down

0 comments on commit 51ffb44

Please sign in to comment.