Skip to content

Conversation

coatless
Copy link
Contributor

No description provided.

@eddelbuettel
Copy link
Member

I see a test failure:

1 Test Suite : 
Rcpp Unit Tests - 611 test functions, 0 errors, 1 failure
FAILURE in test.sort_unique: Error in checkEquals(sort(unique(x), decreasing = TRUE, na.last = TRUE),  : 
  'is.NA' value mismatch: 1 in current 1 in target
unique / character / with NA / decreasing sort

This fixes it:

modified   inst/unitTests/runit.sugar.R
@@ -689,6 +689,7 @@ if (.runThisTest) {
 
     test.sort_unique <- function() {
 
+        set.seed(123)
         x <- sample(LETTERS[1:5], 10, TRUE)
         checkEquals(
             sort(unique(x), decreasing = TRUE),
@@ -704,7 +705,7 @@ if (.runThisTest) {
 
         x <- c(x, NA, NA)
         checkEquals(
-            sort(unique(x), decreasing = TRUE, na.last = TRUE),
+            sort(unique(x), decreasing = TRUE, na.last = FALSE),
             runit_sort_unique_ch(x, decreasing = TRUE),
             "unique / character / with NA / decreasing sort"
         )

@coatless
Copy link
Contributor Author

Thanks @eddelbuettel for catching that.

coatless and others added 2 commits March 20, 2019 19:18
Note: `unique()`'s unit test use `na.last = TRUE` because sorting was done at the R level instead of the C++ level.
@eddelbuettel
Copy link
Member

What I don't understand is why it manifested itself the way it did camouflaging as a timeout -- that may be an issue with the Docker setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants