mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-11-26 22:41:55 +01:00
new tests are commented out. spells trouble on different platforms.
This commit is contained in:
parent
ece04f9948
commit
2006959f57
@ -14,47 +14,47 @@ test_that("contrast_text() returns the correct text color", {
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
library(devtools)
|
# library(devtools)
|
||||||
|
#
|
||||||
install_github("MangoTheCat/visualTest")
|
# install_github("MangoTheCat/visualTest")
|
||||||
library(visualTest)
|
# library(visualTest)
|
||||||
|
#
|
||||||
test_that("New test of color_plot()", {
|
# test_that("New test of color_plot()", {
|
||||||
par(bg=NULL)
|
# par(bg=NULL)
|
||||||
colors <- colors()[34:53]
|
# colors <- colors()[34:53]
|
||||||
|
#
|
||||||
# old <- getwd()
|
# # old <- getwd()
|
||||||
# setwd("/Users/au301842/stRoke/tests/testthat")
|
# # setwd("/Users/au301842/stRoke/tests/testthat")
|
||||||
# setwd(old)
|
# # setwd(old)
|
||||||
|
#
|
||||||
png(filename = "data/test1.png")
|
# png(filename = "data/test1.png")
|
||||||
color_plot(colors,method="relative")
|
# color_plot(colors,method="relative")
|
||||||
dev.off()
|
# dev.off()
|
||||||
|
#
|
||||||
# getFingerprint("data/test1.png")
|
# # getFingerprint("data/test1.png")
|
||||||
|
#
|
||||||
expect_equal(getFingerprint("data/test1.png"), "AD07D27813E1D867")
|
# expect_equal(getFingerprint("data/test1.png"), "AD07D27813E1D867")
|
||||||
# isSimilar(tmp, "AD07D27813E1D867", threshold = 8)
|
# # isSimilar(tmp, "AD07D27813E1D867", threshold = 8)
|
||||||
|
#
|
||||||
#############################
|
# #############################
|
||||||
|
#
|
||||||
# colors <- colors()[51:70]
|
# # colors <- colors()[51:70]
|
||||||
png(filename = "data/test2.png")
|
# png(filename = "data/test2.png")
|
||||||
color_plot(colors,labels = TRUE, borders = FALSE,cex_label = .5, ncol = 3, method="perceived_2")
|
# color_plot(colors,labels = TRUE, borders = FALSE,cex_label = .5, ncol = 3, method="perceived_2")
|
||||||
dev.off()
|
# dev.off()
|
||||||
|
#
|
||||||
# getFingerprint("data/test2.png")
|
# # getFingerprint("data/test2.png")
|
||||||
|
#
|
||||||
expect_equal(getFingerprint("data/test2.png"), "8B0B54D4E4AF2BB1")
|
# expect_equal(getFingerprint("data/test2.png"), "8B0B54D4E4AF2BB1")
|
||||||
|
#
|
||||||
#############################
|
# #############################
|
||||||
|
#
|
||||||
png(filename = "data/test3.png")
|
# png(filename = "data/test3.png")
|
||||||
color_plot(colors,labels = FALSE, borders = TRUE, ncol = 6, method="perceived")
|
# color_plot(colors,labels = FALSE, borders = TRUE, ncol = 6, method="perceived")
|
||||||
dev.off()
|
# dev.off()
|
||||||
|
#
|
||||||
# getFingerprint("data/test3.png")
|
# # getFingerprint("data/test3.png")
|
||||||
|
#
|
||||||
expect_equal(getFingerprint("data/test3.png"), "B706F0F1C119CCF8")
|
# expect_equal(getFingerprint("data/test3.png"), "B706F0F1C119CCF8")
|
||||||
})
|
# })
|
||||||
################################################################################
|
################################################################################
|
Loading…
Reference in New Issue
Block a user