Skip to content

Commit

Permalink
better tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Przemol committed Oct 24, 2016
1 parent f98ca41 commit 5e3ce69
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/testthat/test1.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test_that("Test getPlotSetArray function and plotting interfaces", {
tmp <- file.path(tempdir(), 'SeqPlots')
context("Testing getPlotSetArray")
if(.Platform$OS.type != "windows" || .Machine$sizeof.pointer != 4) {
psa <- getPlotSetArray(bw1, c(bed1, bed2), 'ce10')
psa <- getPlotSetArray(bw1, c(bed1, bed2), 'ce10')
} else {
psa <- get(load(system.file(
"extdata", "precalc_plotset.Rdata", package="seqplots"))[[1]])
Expand Down Expand Up @@ -86,6 +86,10 @@ test_that("Test getPlotSetArray function and plotting interfaces", {
expect_is( getPlotSetArray(bw1, c(bed1, bed2), 'ce10', type = 'af'), "PlotSetArray" )
expect_is( getPlotSetArray(bw1, c(bed1, bed2), 'ce10', stat = 'median'), "PlotSetArray" )

context("Extended functions tests for PlotSetPair")
expect_null(psa[[1]]$show())
expect_null(plot(psa[[1]]))
expect_is(plot(psa[[1]], what='h'), 'data.frame')


})
Expand Down Expand Up @@ -129,6 +133,11 @@ test_that("Test motifs", {
context("Testing heatmap cluster report")
expect_true( all(is.na( psa[1,]$plot('h', clusters=0)$ClusterID )) )
expect_true( all(is.na( plotHeatmap(psa[1,], clstmethod='none' )$ClusterID )) )
expect_true( all(is.na( psa[1,]$plot('h')$SortingOrder )) )

context("Testing heatmap cluster report consistancy")
meta <- psa[1,]$plot('h')
expect_true(all( import.bed(bed1)$name == meta$metadata_name[order(meta$originalOrder)] ))

context("Anchored features test")
if(.Platform$OS.type == "windows" && .Machine$sizeof.pointer == 4)
Expand Down

0 comments on commit 5e3ce69

Please sign in to comment.