From 3f9f6f2be4f53d509e1fc4f165a633d9dfe93cf4 Mon Sep 17 00:00:00 2001 From: Benoit Thieurmel Date: Tue, 5 Oct 2021 10:21:24 +0200 Subject: [PATCH] fix tests on R-devel 4.2 --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ inst/examples/example-reactive_values.R | 16 +++++++++------- tests/testthat/test-inputs.R | 16 ++++++++-------- 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 2e0b2cb..a8e870f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: manipulateWidget Type: Package Title: Add Even More Interactivity to Interactive Charts -Version: 0.11.0 +Version: 0.11.1 Authors@R: c( person("Veronique", "Bachelier", email = "veronique.bachelier@rte-france.com", role = c("aut", "cre")), person("Jalal-Edine", "ZAWAM", role = "aut"), diff --git a/NEWS.md b/NEWS.md index 977cf57..e9cc7dc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ +# manipulateWidget 0.11.1 (2021-10-05) + +## Bug Fixes +* fix tests on R-devel 4.2 + # manipulateWidget 0.11.0 (2020-03-21) ## New features diff --git a/inst/examples/example-reactive_values.R b/inst/examples/example-reactive_values.R index 5e234de..f3f9065 100644 --- a/inst/examples/example-reactive_values.R +++ b/inst/examples/example-reactive_values.R @@ -1,5 +1,13 @@ require(manipulateWidget) require(dygraphs) +mydata <- data.frame( + year = 2000+1:100, + series1 = rnorm(100), + series2 = rnorm(100), + series3 = rnorm(100) +) + + ui <- fillPage( fillRow( @@ -14,12 +22,6 @@ ui <- fillPage( Range = 2001 server <- function(input, output, session) { - mydata <- data.frame( - year = 2000+1:100, - series1 = rnorm(100), - series2 = rnorm(100), - series3 = rnorm(100) - ) c <- manipulateWidget( { @@ -29,7 +31,7 @@ server <- function(input, output, session) { series = mwSharedValue(), title = mwSharedValue( {"init"} - ), .runApp = FALSE, .showCompare = FALSE, + ), .runApp = FALSE, .compare = "range" ) diff --git a/tests/testthat/test-inputs.R b/tests/testthat/test-inputs.R index 493d486..ce54b0c 100644 --- a/tests/testthat/test-inputs.R +++ b/tests/testthat/test-inputs.R @@ -23,8 +23,8 @@ test_input(mwPassword(), list("1", 1, NULL), list("1", "1", "")) test_input(mwSelect(1:4), list(1, 2, 5, NULL), list(1, 2, 1, 1)) test_input( mwSelect(1:4, multiple = TRUE), - list(1, 5, NULL, 3:5), - list(1, integer(0), integer(0), 3:4) + list(1, 5, 3:5), + list(1, integer(0), 3:4) ) # Select where choices have distinct label and values test_input( @@ -34,8 +34,8 @@ test_input( ) test_input( mwSelect(list(a = 1, b = 2), multiple = TRUE), - list(1, 2, 5, NULL, 1:3), - list(1, 2, integer(0), integer(0), 1:2) + list(1, 2, 5, 1:3), + list(1, 2, integer(0), 1:2) ) # Checkbox @@ -84,13 +84,13 @@ test_input( # Checkbox group test_input( mwCheckboxGroup(1:4), - list(1, 5, NULL, 3:5), - list(1, integer(0), integer(0), 3:4) + list(1, 5, 3:5), + list(1, integer(0), 3:4) ) test_input( mwCheckboxGroup(list(a = 1, b = 2)), - list(1, 2, 5, NULL, 1:3), - list(1, 2, integer(0), integer(0), 1:2) + list(1, 2, 5, 1:3), + list(1, 2, integer(0), 1:2) ) # Groups of input