Skip to content

Commit

Permalink
workaround for test error spotted on windows
Browse files Browse the repository at this point in the history
* this *may* have been the error that caused it to be archived from CRAN
  • Loading branch information
jefferis committed Jan 9, 2020
1 parent b90a1bb commit e25a653
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/testthat/test-clustering.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ test_that("plot3d.hclust", {
hc <- nhclust(names(testneurons), scoremat=test_score_mat)
open3d()

expect_equal(attr(plot3d(hc, k=3, db=testneurons),'df')$col,
c("#FF0000FF", "#FF0000FF", "#00FF00FF", "#0000FFFF", "#0000FFFF"))
# workaround for the fact that colours are rgb or rgba
cols <- attr(plot3d(hc, k=3, db=testneurons),'df')$col
baseline <- c("#FF0000", "#FF0000", "#00FF00", "#0000FF", "#0000FF")
expect_equal(col2rgb(cols), col2rgb(baseline))
clear3d()
plot3d(hc, h=2, db=testneurons)
clear3d()
Expand Down

0 comments on commit e25a653

Please sign in to comment.